Skip to content

Instantly share code, notes, and snippets.

@Pouya-moh
Created April 22, 2019 11:38
Show Gist options
  • Save Pouya-moh/16b1f9236478355441cda28c60e3cb3c to your computer and use it in GitHub Desktop.
Save Pouya-moh/16b1f9236478355441cda28c60e3cb3c to your computer and use it in GitHub Desktop.
Python virtualenv
# creating the env
$ virtualenv --no-site-packages -p /path/to/python3 virtualenv_name
## --no-site-packages seems to be depricated as said here:
## https://virtualenv.pypa.io/en/stable/reference/#cmdoption-no-site-packages
## mind PYTHONPATH and pip -E, and to freez system pip:
## https://stackoverflow.com/questions/1382925/virtualenv-no-site-packages-and-pip-still-finding-global-packages
# activate/de
$ source virtualenv_name/bin/activate
(virtualenv_name)$ deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment