I am trying to upgrade a version of python in an existing virtual environment. I installed python using the following steps
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar xfz Python-2.7.11.tgz
cd Python-2.7.11/
./configure --prefix /usr/local/lib/python2.7.11 --enable-ipv6
make
sudo make install
I also checked the version and its correctness.
/usr/local/lib/python2.7.11/bin/python -V
Python 2.7.11
I have an existing virtualenv named test, and I want to use python2.7.11 in this environment. He tried to use
workon test --python /usr/local/lib/python2.7.11/bin/python
But python version is shown as old only
python -V
Python 2.7.6
If I create a new environment, it works great
mkvirtualenv test2 -p /usr/local/lib/python2.7.11/bin/python
python -V
Python 2.7.11
I tried to find a solution but could not figure out how to change the python version in the existing virtual environment. Any help in determining a solution would be appreciated.
thank
source
share