Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
138 lines (85 sloc) 2.91 KB

Mapnik Python Bindings

Official Mapnik python bindings.



Before installing, you need:

  • the mapnik-config utility in your $PATH
  • Boost.Python linked to your python interpreter (see Boost notes)
  • cairo / cairomm (optionnal but enabled if you compiled mapnik with cairo support)
  • mapnik
  • The current python interpreter

Version notes

The python bindings are tied to the mapnik library version.

Mapnik library version Python package
2.0.x mapnik2 (==
2.1.0 mapnik (==2.1.0)

You can find your installed version with:

$ mapnik-config -v

Boost notes

To specify which boost_python lib to link against, you can use:


Where you have on your filesystem


Don't forget that you can play with LDFLAGS/CFLAGS/LD_LIBRARY_PATH to indicate non standart locations for the requirements if it applies.

Standard installation

You can use either easy_install or pip. Choose the one you prefer into:

$ easy_install mapnik         # to use the last known version
$ easy_install mapnik==2.1.0  # to pin the version
$ pip install mapnik          # to use the last known version
$ pip install mapnik==2.1.0   # to pin the version

Standard installation works with virtualenv too.

If an error occurs, please read carefully Prerequisites, Version notes and Boost notes sections before submitting an issue to the Mapnik tracker.


Some developers use buildout to ease deployments.

  • Add mapnik to the list of eggs to install, e.g.
parts = somepart

recipe = minitage.recipe.scripts
# (options like include dirs)
eggs =
  • Re-run buildout, e.g. with:
$ ./bin/buildout






Jump to Line
Something went wrong with that request. Please try again.