[Chicago] Best practices for installing and maintaining python for multiple versions.

Jason Abate jason at panopta.com
Tue Dec 15 16:17:11 CET 2009

You can create multiple virtualenv installations, one per interpreter.  
I do this regularly for different projects and build requirements, each 
install has a script that activates it, so it's just a matter of doing:

    source py2.6-nltk/bin/activate


    source py2.4-tg/bin/activate

to switch between environments.  Once you've run this, executing 
"python" or "easy_install" uses the executables from the virtual 

This works great, and I use it for all of my Python projects now.  It 
also has the advantage of being able to cleanly stay up-to-date with the 
latest development of the various packages you use.  I do all my work on 
Debian which is great for stability but lags far behind the fast-moving 
world of Python.

Note, I haven't jumped to 3.x yet so I'm not sure if anything's changed 
there, but I would assume something similar is possible.


Jason Abate
Panopta | We see it all
jason at panopta.com

Carl Karsten wrote:
> Matt,
> How would you use virtualenv to flip between python 2.x and 3.x?
> On Tue, Dec 15, 2009 at 8:57 AM, Matthew Kemp <mattkemp at gmail.com> wrote:
>> I use virtual environments (http://pypi.python.org/pypi/virtualenv) heavily.
>> Basically they allow you to clone a python install with or without site
>> packages. If you mess up a virtual environment just blow it away and start
>> over.
>> Matt
>> On Mon, Dec 14, 2009 at 10:25 PM, Dave N <Dave_N at comcast.net> wrote:
>>> Hi,
>>> So I've acquired a new laptop. It's a windows 7 laptop.
>>> After setting up python for several personal and work machines, I've
>>> come to conclusion that there must be a better way. I can't seem to
>>> find it, so I thought I would turn to chipy...
>>> I use and experiment with the following installations, roughly in
>>> order of importance.
>>> CPython 2.x (2.6)
>>> CPython 3.x (3.1)
>>> IronPython (2.6)
>>> AppEngine
>>> Jython
>>> I also use several add on modules and have written a few of my own. I
>>> haven't yet figured a good way to install in a sustainable way. For
>>> example, when 2.7 comes out, how do I migrate all of modules over to
>>> that.
>>> Thanks in advance for any ideas...
>>> Dave
>>> _______________________________________________
>>> Chicago mailing list
>>> Chicago at python.org
>>> http://mail.python.org/mailman/listinfo/chicago
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> http://mail.python.org/mailman/listinfo/chicago

More information about the Chicago mailing list