Forked from tamsanh/virtualenv_venv_quick_setup_macosx.sh
Created
September 24, 2018 21:48
-
-
Save fxchen/fddee42607f8c4368576a469818471b4 to your computer and use it in GitHub Desktop.
virtualenv venv Quick Setup MacOSX - Python 3
This file contains 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
# Instructions for setting up a virtualenv venv | |
######### | |
# SETUP # | |
######### | |
## Make sure you have python3 | |
python3 --version | |
### If you don't have Python 3, install it | |
if [[ $? -ne 0 ]]; then | |
brew install python3 | |
fi | |
## Make sure you have pip3 | |
pip3 --version | |
### pip3 should come with python3 when you `brew install python3` | |
## Make sure you have virtualenv | |
virtualenv --version | |
### If you don't have virtualenv, install it | |
pip3 install virtualenv | |
############ | |
# Activate # | |
############ | |
# Use venv | |
## Start by creating a new venv | |
virtualenv -ppython3 venv | |
## Then activate the venv | |
source venv/bin/activate | |
## Then install all of the requirements, if available | |
pip install -r requirements.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment