I am trying to create a virtual environment using mkvirtualenv with python 3 in Windows but the environment is created with python 2.7.My pip version is also from python 2.7 which i have avoided using
JavaScript
x
2
1
py -m pip install virtualenvwrapper-win
2
When i do
JavaScript
1
2
1
mkvirtualenv test
2
environment is created with python 2.7 Please help me with a solution Thanks in advance:)
Advertisement
Answer
If you would like to create a virtualenv with python 3.X
having the version 2.X
You just have to pass a parameter argument for your virtual env.
JavaScript
1
2
1
$ virtualenv venv -p $(which python3)
2
This command will point to your current python3 install folder, and create a virtualenv copied from your current python3 binaries.
If you would like to see what this command does, just fire the command:
JavaScript
1
3
1
$ which python3
2
#should print your current python3 binary folder.
3