Virtualenv Python 2.4

When using virtualenv, I find that the command: virtualenv -p python2.6 --no-site-packages ~ / env / NEW_PROJECT works without problems, however, if I try to make virtualenv -p python2.4 --no -site-packages ~ / env / NEW_PROJECT I get the error message "Executable python2.4 (from -python = python2.4) does not exist. Is there a way to configure virtualenv using python2.4?

thanks

+4
source share
2 answers

You may not have python2.4 installed or not in $PATH .

virtualenv , other than rvm , does not install Python versions, uses only what you already installed. When you use the -p option, it means --python , you are telling virtualenv to create a new sandbox based on this Python installation.

So, if you have a Python 2.4 installation somewhere, just do:

 $ virtualenv --python /path/to/python2.4/bin/python2.4 --no-site-packages ~/env/NEW_PROJECT 

PS .: --no-site-packages deprecated in new versions of virtualenv . By default, it does not use global site packages.

+2
source

Support for python2.4 been reset in virtualenv 1.8 , so make sure you use virtualenv<=1.7.2 .

+1
source

All Articles