<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear Alexander and cython list,<br>
<br>
the same question, different approach <br>
<br>
a) I compiled and installed my python module with these two commands<br>
C:\Temporal\source\Cython_ext> python OK_setup_windows.py
build_ext<br>
C:\Temporal\source\Cython_ext> python OK_setup_windows.py install
<br>
<br>
b) Testing my module in IPython <br>
---------------------------------------------------------------------------------------------------------<br>
<font face="Courier New">In [5]: cd c:\<br>
c:\<br>
<br>
In [6]: import okriging_py as ok<br>
------------------------------------------------------------<br>
Traceback (most recent call last):<br>
File "<ipython console>", line 1, in <module><br>
ImportError: DLL load failed: The specified module could not be
found.<br>
<br>
<br>
In [7]: cd C:\Python27\Lib\site-packages<br>
C:\Python27\Lib\site-packages<br>
<br>
In [8]: import okriging_py as ok<br>
<br>
In [9]:<br>
</font>---------------------------------------------------------------------------------------------------------<br>
<br>
as you can see the module works if we call it from the source
directory.<br>
<br>
my question are:<br>
a) where is the problem<br>
b) how to distribute my module without this (possible system
configuration) error<br>
<br>
my OS is windows 7 (probably with win xp compatibility)<br>
<br>
sorry about my ignorance (I am more Linux Debian user...)<br>
<br>
Regards <br>
Adrian<br>
<br>
<br>
<br>
On 19/10/2011 12:45 PM, Alexander T. Berghage wrote:
<blockquote
cite="mid:CAGRfJ0ZRwHUY44XWkn6g6ytwzpm4de+jYBZu1EWUisFdDWzyLg@mail.gmail.com"
type="cite">
<pre wrap="">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] <a class="moz-txt-link-freetext" href="http://www.dependencywalker.com/">http://www.dependencywalker.com/</a>
Hope that helps!
Best,
-Alex
_______________________________________________
cython-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cython-devel@python.org">cython-devel@python.org</a>
<a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/cython-devel">http://mail.python.org/mailman/listinfo/cython-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>