Install Mapnik on Ubuntu 9.04 Jaunty Jackalope

This is an addition to Build your own OpenStreetMap Server. The original article addresses the general case of installing on Ubuntu.
My mapnik installation broke during or after I upgraded to Ubuntu Jaunty (9.04).
If you see the following error ...
ImportError: No module named mapnik
... these instructions may resolve the problem.
Others have reported this error, and there are several suggested fixes around the web. This specific case was not.
In my case mapnik was binding to Python 2.5, where the rest of my system was using Python 2.6. When running ~mapnik/z0_generate_tiles.py, for example, it would invoke Python 2.6, but Python could not find mapnik. How come? scons is supposed to Just Work.
In my case, ~/mapnik/config.py was set to use Python 2.5 only.
Check ~/src/mapnik/config.py
If a line refers to python 2.5, remove it.
Re-run the configure, and scons should find the right Python and Just Work. Then complete the build and install steps as before.
Good luck.
Shoutout!
Thanks again to the awesome springmeyer for all the guidance and patient remote troubleshooting.
Thanks sfllaw on Flickr for licensing your Square peg and round hole
photo, above as CC_BY-SA.




Articles © 2010
Map images and data © 2010
Post new comment