I'm working with virtualenv in a project that was initialised with python2.7 and now i want to change the python version of my project with python3.5 by default! Can anyobody help me !!!
You can use this command:
mkvirtualenv -p python3 env-name
Detailed instruction to change your Python version:
rmvirtualenv
This will remove the virtualenv, but leave your project files.
Example: mkvirtualenv -p python3 env-name
You can specify the Python version with the -p
flag and version. If you have a requirements.txt file, you can specify that with -r requirements.txt
Example: setvirtualenvproject
The source is here