Multiple versions of Python coexisting in the same OS

Joel Goldstick joel.goldstick at columbuswebmakers.com
Sun Jul 25 13:51:07 EDT 2010


Edward Diener wrote:
> Are there any documents about multiple versionsof Python coexisting in 
> the same OS ( Windows in my case ) and what pitfalls to look out for ? I 
> have already run into a number of them. I installed Python 2.7 and 3.1.2 
> into completely folders, but immediately ran into serious problems 
> executing a Python script.
> 
> The first problem is that just invoking Python will start whichever 
> version is first in the PATH, and this is true from the command line or 
> internally in a Python script.
> 
> The second problem is that invoking a script ( some xxx.py ) will start 
> whichever version of Python is associated with the .py extension.
> 
> The third problem is if some software expects its scripts, which it puts 
> in some Python subdirectory to be in the PATH.
> 
> There may be other considerations but overall having to versions 
> coexisting has turned out to be a big headache involving both changes in 
> the PATH and in the .py association.
> 
> Does anybody know of other things to look out for ?

There is this:
http://pypi.python.org/pypi/virtualenv

We have a good group in NYC for python and django.  That's where I 
learned about virtualevn.  I admit I'm not fully up to speed on it, but 
it lets you set up multiple 'virtual environments' for python to do 
exactly what I think you are asking about

Joel Goldstick



More information about the Python-list mailing list