[Cython] ImportError: DLL load failed: The specified module could not be found.

Alexander T. Berghage aberghage at gmail.com
Wed Oct 19 21:45:27 CEST 2011


Adrian

I'm a little unclear on the big picture here. Are you trying to
distribute a module (a .pyd / .dll) that you or someone else can
import from a .py script, or are you looking to compile a .exe that
runs your cython code on execution?

----

Just interpreting the error you're describing (ImportError: DLL load
failed: could not be found),  the dynamic linker couldn't find a
library it needed. Most likely this is either a symptom of missing
dependencies or a path problem. Here's my suggestions for diagnosing
and fixing the problem:

Missing Dependencies:
    One very simple way to confirm that all the dependencies of your
cython module are
    available is to point the dependency walker utility[1] at it, and
look for missing DLLs.

Directory Structure:
    Is the .pyd file you built from your cython module in the
PYTHONPATH (or your current
    working directory? If it's not, there's your issue.

[1]  http://www.dependencywalker.com/


Hope that helps!

Best,
-Alex


More information about the cython-devel mailing list