Skip to content

Instantly share code, notes, and snippets.

@yosemitebandit
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosemitebandit/91b4143ffad899aebef8 to your computer and use it in GitHub Desktop.
Save yosemitebandit/91b4143ffad899aebef8 to your computer and use it in GitHub Desktop.
virtualenv setup for the ipython mapping tutorial: http://sensitivecities.com/so-youd-like-to-make-a-map-using-python-EN.html
# run the ubuntu setup script first
# note that this isn't quite a true shell script -- some paths will need modification
# setup and activate a venv
virtualenv /path/to/venv
source /path/to/venv/bin/activate
# order seems to matter here :|
# so not everything can be in the requirements file
pip install numpy
pip install distribute --upgrade
pip install matplotlib
pip install scipy
pip install pyzmq
# basemap needs compilation :((
# following https://gist.github.com/KKostya/7abb26e1cfc17f0731eb
# and http://jeffskinnerbox.me/posts/2013/Oct/06/ipython-notebook-in-virtualenv/
# though maybe you could 'pip install' it after setting the GEOS_DIR
wget http://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz
tar -zxvf basemap-1.0.7.tar.gz
cd basemap-1.0.7
cd geos-3.3.3
mkdir ~/install
./configure --prefix=/home/matt/install
make
make install
export GEOS_DIR=/home/matt/install
cd ..
python setup.py build
python setup.py install
# other reqs can be installed from the reqs file
pip install -r requirements.txt
Fiona==1.4.8
Jinja2==2.7.3
MarkupSafe==0.23
PySAL==1.8.0
Shapely==1.5.1
argparse==1.2.1
backports.ssl-match-hostname==3.4.0.2
certifi==14.5.14
click==3.3
descartes==1.0.1
ipython==2.3.1
lxml==3.4.1
mock==1.0.1
nose==1.3.4
pandas==0.15.2
pyparsing==2.0.3
python-dateutil==2.3
pytz==2014.10
six==1.8.0
tornado==4.0.2
wsgiref==0.1.2
# run this before setting the python setup
# before installing gdal, I had to blow away libuuid1 due to some broken dependency chain
sudo dpkg -r --force-all libuuid1
sudo apt-get -f install
sudo apt-get install libgdal-dev
sudo apt-get install libxml2-dev libxslt1-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment