Last active
October 15, 2018 07:39
-
-
Save michaelkarrer81/ac6df58592fa81bd9bc4fdb54e7a964d to your computer and use it in GitHub Desktop.
[Virtual env Cheat Sheet] Virtual Environment Cheat Sheet #python #virtualenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------- | |
# 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