While installing Mapnik in Windows 10 64bit and with Python version 2.7.5(64bit) I have encountered this error:

import mapnik Traceback (most recent call last): File "", line 1, in File

"C:\Python27\lib\site-packages\mapnik__init__.py", line 69, in from _mapnik import * ImportError: DLL load failed: %1 is not a valid Win32 application.

Any suggestion?

1 Answer 1


Mapnik precompiled binaries are only 32-bit.


Running it under a installation of Python that is 64-bit it attempts load a 32-bit library as a 64-bit library, thus the error. Not certain how Windows handles binary mismatches, if it cannot find it or it is not what it expects. The error suggests the latter.

The solutions is to install the 32-bit version of Python. They should be able to live side-by-side.

A github issue describing the same issue and solution.

Your Answer

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

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