It’s usually easy to install a Python package in Windows with pip or other pre-built binaries. However, sometimes we must build the binary from source by ourselves, such as Basemap module, a part of matplotlib-toolkit.
Then we may meet some error just like this:

Actually, there’s a small bug in the “Distutils” component in some versions of Python. This bug has not been repaired until Dec. 2014 and has influence on Python 2.7, 3.4, 3.5. (See Reference: Python Distutils Issue)

When compiling and linking using MSVC toolchain, Python uses a MANIFEST file. However, Python doesn’t pass /MANIFEST option to the linker so the linker will not generate the MANIFEST file correctly (See Reference: Linker Options (VS2013))

The proper way is to pass /MANIFEST option to the linker by adding a line to manifest_setup_ldargs() in <python-install-prefix>/lib/distutils/msvc9compiler.py

This bug might be solved in newer versions.

Link Error When Compiling and Installing Python Package in Windows

Leave a Reply

Your email address will not be published.