Python version 2.6.6 on CentOS Python version you want to use in a virtual environment 2.7.6
The Python 2.7.6 binary is
/opt/local/bin/python2.7
will do.
## When entering a virtual environment
$python -V Python 2.6.6
$mkvirtualenv --python=/opt/local/bin/python2.7 myvenv Running virtualenv with interpreter /opt/local/bin/python2.7 New python executable in myvenv/bin/python2.7 Not overwriting existing python script myvenv/bin/python (you must use myvenv/bin/python2.7) Installing setuptools, pip...done.
(myvenv)$python -V Python 2.7.6
## When leaving the environment
(myvenv)$deactivate
$python -V Python 2.6.6
Recommended Posts