On Tue, Mar 26, 2013 at 3:18 PM, Sean Carolan <scaro...@gmail.com> wrote:

>
>  Could it be that it is taking the system python executable which is
>> probably 2.4?
>>
>> -Amit.
>
>
> I've tried it with python24, python25 and python27 and all of them give
> the same error.
>
>
What it looks like to me is that while you run (using python 2.7):

>  python27 setup.py bdist_rpm

doing that generates a temporary bash script, which in turn runs:

> python setup.py build

which is linked to the system default python, which I'm guessing is 2.4. No
matter which version you execute the first one with, the bash script
generated will always try to use the system-default python. This is
essentially a bug in the setup script; it should generate a script that
uses the same python version it was executed with, ideally.

The easiest workaround I can think of is a temporary alias, i.e.:

$ alias python="python27" && python setup.by bdist_rpm && unalias python

Or some variation of such. The more permanent fix is to change the bash
script that setup.py generates so it's less naive about having the right
system python installed, *or* upgrading the system python version.

HTH,
Hugo
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to