[BangPypers] Running multiple versions of python on Fedora
pradeep at btbytes.com
Mon Oct 12 19:18:51 CEST 2009
On Mon, Oct 12, 2009 at 7:30 AM, Arvind Jamuna Dixit <ardsrk at gmail.com> wrote:
> Has anyone here tried installing multiple versions of python ( say 2.6 and
> 3.0 )
> onto a Fedora system ( specifically fedora 11 )?
Having multiple versions on the same machine is not the problem. Most
distros already ship with at least two version (Ubuntu 2.6 and 2.5).
What is that you want to do with two python versions (esp since 3.x is
introduces some backward incompatibility) is the more interesting
question, which is not clear from your question.
Is it that you just want know whether it is possible to have two versions?
A: yes! you can.
Or is it that you want to run some scripts under 2.6 and some others under 3.0?
A: keep default python pointing to python2.x, put python3 in the #!
line in py3 scripts
ie., #!/usr/bin/env python3
There is no virtualenv for Python 3.x yet.
If you want to switch between the two:
`ports` on mac provides a bash script called `python_select`(see:
http://dpaste.com/106254/ for the bash script.) which allows you to
set the default python version.
On debian systems, the default python interpreter can be changed by
editing /usr/share/python/debian_defaults. look for something similar
There is also the brute force method of deleting the symlink and
pointing it to the version you want.
More information about the BangPypers