I have already created a virtual env,in which python 3.4 is already installed,is there a way i can install python 3.5 in this env.i already tried pip install python3.5 ,i get -no distributions found that satisfy the requirement
1
votes
2 Answers
2
votes
You should use virtualenv command once again, this time with new python executable as a parameter:
virtualenv env -p python3.5
(supposing you previously installed virtual env into folder named env).
As you don't pass --clear parameter, your previous files will be kept inside env dir
Edit:
If you want to to use within your virtualenv a python version not installed globally on your system and don't want to install new version of python globally, you can follow these steps:
1) download and compile required version of python (not installing it via make install)
2) pass the path to new python executable to the -p parameter of virtualenv command, like virtualenv env -p /home/user/python3.5/python