What is the command to create a python virtual environment from the command line?
Asked
Active
Viewed 1,108 times
-5
-
https://stackoverflow.com/search?q=%5Bvirtualenv%5D+how+to+create – phd Feb 01 '19 at 23:59
-
https://stackoverflow.com/questions/41573587/what-is-the-difference-between-venv-pyvenv-pyenv-virtualenv-virtualenvwrappe – phd Feb 01 '19 at 23:59
1 Answers
-1
Linux/macos: virtualenv -p python3 env source env/bin/activate pip install -r requirements.txt
windows: virtualenv -p python3 env env\scripts\activate pip install -r requirements.txt
if you need to specify the full path to python you can use something like virtualenv -p C:\Program Files\Python36\python.exe myvirtualenv

Brian Sunbury
- 45
- 2
- 9