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

Matthew Kemp mattkemp at gmail.com
Tue Dec 15 16:31:04 CET 2009


Like Jason said I have one (or more) virtual environment for each version of
python I want to work with. So a 2.5 virtualenv, 2.6 virtualenv, etc.
Although I've only tried virtualenv on CPython installs. I haven't tried for
Jython or IronPython.

Matt

On Tue, Dec 15, 2009 at 9:17 AM, Jason Abate <jason at panopta.com> wrote:

> 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
>
> or
>
>   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 environment.
>
> 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
>
> Jason Abate
> Panopta | We see it all
> jason at panopta.com
> http://www.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
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20091215/c9275e21/attachment.htm>


More information about the Chicago mailing list