- You don't conflict with the global python library. Because all new library will be in the isolated environment, on linux many software uses python
- Then you have a fine grain control of what library is needed what is not, for each environment.
- Because all of the cool pythonista use that...ok that is not quite true, but many python based project strongly recommend using virtualenv, such as turbogears.
- and some tools are available for this, such as pip.
- It make it more easier to move project between directory
here I assume that python setuptools is installed, i assume each project is one environment
to install, just run below as administrator.
easy_install -U virtualenvTo start a project
virtualenv projectnameThis will setup an environment, with their own setuptools.
Let start using it
source projectname/bin/activateand it should have the whole python environment there, isolated from the system. including python, their own site-packages
To stop using it
deactivateTo totally isolate from the system, start a new project by
virtualenv --no-site-packages projectnameIt will not use library from the system.
Some tools already begin to support virtualenv. Such as pip, a replacement for easy_install, with uninstall support. To use pip with virtualenv
pip -E projectname packagenameSo, virtualenv is now the requirement of most project now. Time to learn it...