[Tutor] Setting PYTHONPATH and other env vars dynamically

Kent Johnson kent37 at tds.net
Wed Aug 19 23:26:21 CEST 2009


On Wed, Aug 19, 2009 at 4:37 PM, Jramak<jramak345 at gmail.com> wrote:
> I
> also looked at virtualenv http://pypi.python.org/pypi/virtualenv . Each
> virtual env takes up 2.3 MB. To me this seems a bit of overkill, but this
> will enable you to run Python24, Python25, Python26 etc specific code on one
> computer.

You don't need virtualenv to run different versions of Python on one
computer, just specify which interpreter you want to use to run a
script.

By default virtualenv copies your site-packages directory to each
virtual environment, that is probably the bulk of the 2.3 MB. Disable
the copy with the --no-site-packages option. Of course you will then
have to install any needed modules yourself.
http://pypi.python.org/pypi/virtualenv#the-no-site-packages-option

Kent


More information about the Tutor mailing list