Skip to content

Instantly share code, notes, and snippets.

@retrography
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save retrography/d309e47290badd420b82 to your computer and use it in GitHub Desktop.

Select an option

Save retrography/d309e47290badd420b82 to your computer and use it in GitHub Desktop.
Python Bootstrap
#!/bin/bash
os=`uname`
# Python
if [[ "$os" == 'Linux' ]]; then
apt-get install -y python python-pip python-dev #python3 python3-pip python3-dev
elif [[ "$os" == 'Darwin' ]]; then
brew install python
fi
pip2 install --upgrade pip
pip2 install --upgrade virtualenv
#pip3 install --upgrade pip
#pip3 install --upgrade virtualenv
## Science
### General
pip2 install -U numpy scipy "ipython[notebook]"
#pip3 install -U numpy scipy "ipython[notebook]"
## Vis
pip2 install -U bokeh plotly lightning-python
## Machine Learning & NLP
#pip3 install -U nltk scikit-learn
pip2 install -U nltk scikit-learn
### Network Tools
#### NetworkX & iGraph
pip2 install -U igraph networkx
#pip3 install -U igraph networkx
### graph-tool
if [[ "$os" == 'Linux' ]]; then
echo "deb http://downloads.skewed.de/apt/"$(lsb_release -sc)" "$(lsb_release -sc)" universe" | tee -a /etc/apt/sources.list
echo "deb-src http://downloads.skewed.de/apt/"$(lsb_release -sc)" "$(lsb_release -sc)" universe" | tee -a /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 98507F25
apt-get update
apt-get install -y python-graph-tool #python3-graph-tool
elif [[ "$os" == 'Darwin' ]]; then
brew install graph-tool
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment