Python 2 or 3

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Dec 9 19:19:48 EST 2011


On Sat, 10 Dec 2011 00:16:30 +0100, Enrico 'Henryx' Bianchi wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Tobiah wrote:
> 
>> Use the newer version and don't look back.
> 
> Interesting reply, but if I have a platform wich doesn't support Python
> 3 (e.g. RHEL 5.x)? ]:)

RHEL supports Python 3, it just doesn't provide Python 3. It almost 
certainly will work if you install from source. I haven't tried it on 
RHEL myself, but I have done so on Fedora and Centos, and there's no 
problem.

But be warned that you should not replace the system python with Python 
3. When installing, don't use "make install", as that will replace the 
system Python, instead use "make altinstall". Then the command "python" 
will still refer to the system Python (probably Python 2.4 or 2.5?), and 
"python3" should refer to Python 3.x.


> Enrico
> P.S. note that: I *don't* want to recompile Python in production
> environment

You shouldn't be learning programming on a production server :)


-- 
Steven



More information about the Python-list mailing list