Skip to content

Instantly share code, notes, and snippets.

@michaelkarrer81
Last active October 15, 2018 07:39
Show Gist options
  • Save michaelkarrer81/ac6df58592fa81bd9bc4fdb54e7a964d to your computer and use it in GitHub Desktop.
Save michaelkarrer81/ac6df58592fa81bd9bc4fdb54e7a964d to your computer and use it in GitHub Desktop.
[Virtual env Cheat Sheet] Virtual Environment Cheat Sheet #python #virtualenv
# --------
# PYTHON 3
# --------
# Create a new virtual environment
python3 -m venv "your_venv_folder"
# Activate the new venv it with bash script called "source"
source "your_venv_folder/bin/activate"
pip ...
# --------
# PYTHON 2
# --------
virtualenv -p /usr/bin/python2.7 "your_venv_folder"
source "your_venv_folder/bin/activate"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment