#41: installing mapnik in OS X with MacPorts
Solved!
Mapnik is an open source map rendering lib that makes pretty maps and has an extensive Python API. Unfortunately, it's still a pain in the ass to install with macports. Luckily, there are some really helpful people in the community....
get everything just right...
- kueda on May 01, 2009, 04:56 PM UTC
The directions at http://trac.mapnik.org/wiki/MacInstallation are pretty good, but they're missing some important things:
* you need to use python26, b/c the boost +python25 port is broken
* you should delete ALL pre-existing mapnik files from previous attempts
* do NOT use sudo when configuring, or it may not detect some important ENV vars
* you add some extra build flags to make really, really sure it builds against the macports version of python:
So in the end, after installing all the deps with macports as described on the Mapnik wiki, my config and build looked like this:
Many, many thanks to Dane Springmeyer for superheroically helping me out with this.
* you need to use python26, b/c the boost +python25 port is broken
* you should delete ALL pre-existing mapnik files from previous attempts
* do NOT use sudo when configuring, or it may not detect some important ENV vars
* you add some extra build flags to make really, really sure it builds against the macports version of python:
FRAMEWORK_PYTHON = False
FULL_LIB_PATH = True
PREFIX = '/opt/local/'
So in the end, after installing all the deps with macports as described on the Mapnik wiki, my config and build looked like this:
python scons/scons.py configure \
FULL_LIB_PATH=True \
PREFIX=/opt/local/ \
FRAMEWORK_PYTHON=False \
PNG_LIBS=/opt/local/lib \
PNG_INCLUDES=/opt/local/include \
ICU_INCLUDES=/opt/local/include \
ICU_LIBS=/opt/local/include \
XML2_CONFIG=/opt/local/bin/xml2-config
python scons/scons.py
sudo python scons/scons.py install
Many, many thanks to Dane Springmeyer for superheroically helping me out with this.