[Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

Walter Prins wprins at gmail.com
Tue Mar 26 18:07:08 CET 2013


Hi,


On 26 March 2013 16:54, Hugo Arts <hugo.yoshi at gmail.com> wrote:

> On Tue, Mar 26, 2013 at 3:18 PM, Sean Carolan <scarolan at 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.
>>
>
> 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.
>

Sean you might also look into virtualenv.  I suspect a suitably setup
virtualenv will also avoid your problem, but is obviously more work than
what Hugo's suggested.  See for example this question on stackoverflow:
http://stackoverflow.com/questions/1534210/use-different-python-version-with-virtualenv


Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130326/25df3462/attachment-0001.html>


More information about the Tutor mailing list