Virtualenvwrapper Common Commands


Virtualenvwrapper Common Commands

1. Create Virtual Env

mkvirtualenv --python=python3.6 [venv name]

2. Active Env

workon [venv name]

3. Exit Env

deactivate

4. Delete Env

rmvirtualenv [venv name]

5. Other Commands

# check installed packages version
pip freeze

# create requirements.txt which include packages name and version
# install all packages with one click
pip install -r requirements.txt
pip freeze > requirements.txt 

# check all venv
lsvirtualenv

# go into actived venv dir / site-packages
cdvirtualenv
cdsitepackages

# display the contents in the site-packages
lssitepackages

Author: NI
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source NI !
  TOC