I have been trying for two days on installing virtualenv on cmd prompt. Does anyone have a solution to this problem?
Asked
Active
Viewed 7,349 times
-2
-
What isn't working? – Oliver Charlesworth May 05 '18 at 21:39
-
I don't know how to install it on cmd. Do you know? – Luke May 05 '18 at 21:40
-
`venv` comes with recent versions of Python, ready to be run. – lit May 05 '18 at 22:19
-
Possible duplicate of [Python and Virtualenv on Windows](https://stackoverflow.com/questions/17737203/python-and-virtualenv-on-windows) – phd May 05 '18 at 22:57
1 Answers
1
I think you are using Windows.
To install virtualenv in windows, follow these steps:
- Open scripts folder where pip is located in cmd
- Type
pip install virtualenv
- Then you should install virtualenv wrapper for windows. Type this code
pip install virtualenvwrapper-win
- Create project dir:
mkvirtualenv myproject
- Set myproject dir as current dir:
setprojectdir ..../myprojectdir
- You are good to go. When you want to deactivate, simply type
deactivate

Ekrem Gurdal
- 1,118
- 13
- 14
-
FYI: You can set the project directory with the `-p` switch to `mkvirtualenv` too. – thebjorn May 05 '18 at 22:59