Trying to get a server up running OpenAddresses in a controlled environment. I’m normally very sloppy and install everything as root in /usr, but I figured I should use virtualenv this time. Machine actually has a very nice Chef setup and bootstraps itself regularly in EC2 and Travis contexts, but I’m stubborn and doing it my own way.
Install openaddresses-machine and it’s simple dependencies
- Prepare a virtualenv directory and activate it
- pip install Openaddresses-Machine
Install cairocffi. This required a C library I didn’t have
- sudo apt-get install libffi-dev
- pip install cairocffi
Install Python GDAL. This is a mess; I’m not sure why the simple “pip install GDAL” doesn’t work from inside the virtualenv. And I’m not sure the instructions below are correct; it’s probably installing python-gdal globally on the system via and then again in the virtualenv via pip. But that gets all the C dependencies we need somewhere on the system. There’s extra rigamarole to get the bleeding edge GDAL instead of the stock Ubuntu GDAL. Also building GDAL requires a C++ compiler.
- apt-get install software-properties-common
- sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
- sudo apt-get update
- sudo apt-get install python-gdal libgdal-dev
- sudo apt-get install g++
- pip install GDAL
- PSYCH! That won’t work. Follow the instructions in this gist for how to manually configure and install gdal. Apparently its packaging is not compatible with pip?