I am installing Mapnik v2.2.0 on my 64 bit Windows with (64 bit) Python 2.7. After following the usual install guide, when trying to import mapnik I get the following error:

Traceback (most recent call last):

File "<ipython-input-9-1290ece2bb4b>", line 1, in <module>
import mapnik

File "x\mapnik-v2.2.0\python\2.7\site-packages\mapnik\__init__.py", line 69, in <module>
from _mapnik import *

ImportError: DLL load failed: %1 is not a valid Win32 application.

This definitely sounds to me like a 32 bit-64 bit issue, and Mapnik does say that its installation is for 32 bit. However, Googling around seems to suggest it should also work on 64 bit installation (as e.g. none of the guides explicitly say "this will absolutely not work if you're on 64 bit).

What would you think is the issue? Should I install 32 bit Python on my 64 bit OS? I would rather treat that as a last resort.

  • Windows 7 or 10?
    – Mapperz
    Sep 27, 2016 at 16:57

2 Answers 2


According to http://mapnik.org/pages/downloads.html, there are only 32-bit builds for Mapnik 2.2.0 on Windows.

https://gist.github.com/springmeyer/5651701 and https://github.com/mapbox/windows-builds note a 32-bit installation of Python27 is necessary to run Mapnik.

There still seem to be differences for 32-bit and 64-bit Windows operating systems, but both should work.

See also https://github.com/mapnik/mapnik-packaging/issues/188 for self-compiling.

I tried Mapnik 2.2.0 without success on Windows 8. I managed to install the 2.01rc0 version I still had saved on disk, but that does not seem to be online anymore. My Python version is 2.7 32-bit.

  • Yeah, I gave up, installed 32 bit Python and everything works like a dream. Thank you very much!
    – Confusio
    Sep 28, 2016 at 15:00

This doesn't appear to be a problem with 32/64 bit, as 64 bit is backwards compatible. I would first make sure that your mapnik was downloaded correctly, Win32 errors are generally raised when a file is corrupted/incomplete. If that doesn't work check to make sure you're also using 32 bit python.

  • 2
    My python is 64 bit. Part of the reason I'm asking is that I would like to avoid having to uninstall the entire python and rebuild a 32 bit version - is mapnik just straight up incompatible with 64 bit Python?
    – Confusio
    Sep 28, 2016 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.