ong-z
1/8/2016 - 6:18 AM

Virtualenv https://virtualenv.pypa.io/en/latest/userguide.html

# create new environment
mkvirtualenv {{env}}

# remove environment
rmvirtualenv {{env}}

# display list of environments
workon

# activate or switch environments
workon {{env}}

# switch from a virtual environment to the system-installed version of Python
deactivate

# show content of site-packages
lssitepackages
# Create virtual environment
virtualenv ENV

# Activate script -> mainly adds bin to first entry in $PATH
source bin/activate

# Undo changes to $PATH
deactivate

# To add virtualenv to pycharm project
# Go to Preferences > Project: > Project Interpreter > ... > Add Local 
# > select the python binary in the virtualenv's bin directory > Apply