Desculpe-nos, mas este texto está apenas disponível em Inglês Americano. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

First you need to install the following packages:

  • Python
  • Pip
  • Virtualenv

Now you need to follow these steps:

cd /home/myuser/myvenvs
virtualenv --no-site-packages --distribute mynewvenv

If you want to use a custom version of python, use this command instead:

virtualenv -p /opt/python-2.7.3/bin/python2.7 --no-site-packages --distribute mynewvenv

Where /opt/python-2.7.3/bin/python2.7 is the python binary you want to use (virtualenv can get its dependencies and packages automatically from the binary references, so you don’t need to worry about this)

Now you can enter the newly created VirtualEnv:

source ./mynewvenv/bin/activate

And, eventually, if you have a file called “DEPENDENCIES” or something similar (which was generated by running a “pip freeze > DEPENDENCIES” command), you may install those dependencies by using the following command:

pip install -r DEPENDENCIES

That’s it! Now you can start digging around in your new VirtualEnv.