Created
June 24, 2016 18:17
-
-
Save caseywdunn/63c1932123f5d071489e5c4eecb2fe2d to your computer and use it in GitHub Desktop.
Setup and examples of virtualenv on osx
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
# Setting up virtualenv on macOS Yosemite | |
brew update | |
brew upgrade | |
which python # check location of system version | |
brew install python | |
brew install freetype # Needed by some python packages | |
brew install libxml2 # Needed by some python packages | |
pip install virtualenv virtualenvwrapper pytest | |
# Added the following lines to ~/.bash_profile (without leading #) | |
# export PIP_REQUIRE_VIRTUALENV=true | |
# export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache | |
# export WORKON_HOME='~/Dropbox/virtualenvs' | |
mkdir ~/Dropbox/virtualenvs | |
source ~/.bash_profile | |
source /usr/local/bin/virtualenvwrapper.sh | |
# For example, make and load the virtual environment biolite | |
mkvirtualenv biolite | |
git clone https://[email protected]/caseywdunn/biolite.git | |
cd biolite | |
git checkout devel | |
pip install matplotlib # Not sure why, but works best to install matplotlib first | |
pip install -e . | |
# Deactivate the virtual environment | |
deactivate | |
# Work on it again | |
workon biolite | |
# Delete it | |
deactivate | |
rmvirtualenv biolite | |
# A Scinve virtualenv | |
mkvirtualenv science | |
pip install jupyter matplotlib numpy scipy pandas nltk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment