Discussion:
[Python.NET] Using numpy/matplotlib - DLL Load Failed
ElMariachi
2011-04-14 14:26:21 UTC
Permalink
Has anyone encountered this error before? What DLL is being searched for and
not found? Any help is greatly appreciated!
import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 142, in
<module>
import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module>

from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module
from type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<modu
le>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<modul
e>
import multiarray
ImportError: DLL load failed: The specified module could not be found.
--
View this message in context: http://old.nabble.com/Using-numpy-matplotlib---DLL-Load-Failed-tp31397569p31397569.html
Sent from the Python - pythondotnet mailing list archive at Nabble.com.

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
Barton
2011-04-16 20:00:56 UTC
Permalink
I have had tons of issues with python 2.7 and manifest issues that did
not occur in 2.6.
A short term solution would be to start python from the standard
(cpython) python.exe, import your extension libraries that don't play
nicely first, then import clr (relying on the late-bound import hook).
Post by ElMariachi
Has anyone encountered this error before? What DLL is being searched for and
not found? Any help is greatly appreciated!
import numpy
File "<stdin>", line 1, in<module>
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 142, in
<module>
import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module
from type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<modu
le>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<modul
e>
import multiarray
ImportError: DLL load failed: The specified module could not be found.
_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
ElMariachi
2011-04-19 13:22:55 UTC
Permalink
I've tried just this - starting up pythonnet.exe and importing pylab, or
matplotlib, or numpy as the first import prior to clr. I still get the DLL
not found errors. Have you found any other solution?
Post by Barton
I have had tons of issues with python 2.7 and manifest issues that did
not occur in 2.6.
A short term solution would be to start python from the standard
(cpython) python.exe, import your extension libraries that don't play
nicely first, then import clr (relying on the late-bound import hook).
Post by ElMariachi
Has anyone encountered this error before? What DLL is being searched for and
not found? Any help is greatly appreciated!
import numpy
File "<stdin>", line 1, in<module>
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 142, in
<module>
import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module
from type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<modu
le>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<modul
e>
import multiarray
ImportError: DLL load failed: The specified module could not be found.
_________________________________________________
http://mail.python.org/mailman/listinfo/pythondotnet
--
View this message in context: http://old.nabble.com/Using-numpy-matplotlib---DLL-Load-Failed-tp31397569p31432493.html
Sent from the Python - pythondotnet mailing list archive at Nabble.com.

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
Tribble, Brett
2011-04-19 18:53:00 UTC
Permalink
Import multiarray first as well. Numpy is doing an import in the __init__ according to what I see here, unless I'm wrong, which is also likely. Lather, rinse, repeat for any additional modules that fail to load.

This bug has plagued my pythondotnet usage since day 1...


-----Original Message-----
From: pythondotnet-bounces+btribble=ea.com-+ZN9ApsXKcEdnm+***@public.gmane.org [mailto:pythondotnet-bounces+btribble=ea.com-+ZN9ApsXKcEdnm+***@public.gmane.org] On Behalf Of ElMariachi
Sent: Tuesday, April 19, 2011 6:23 AM
To: pythondotnet-+ZN9ApsXKcEdnm+***@public.gmane.org
Subject: Re: [Python.NET] Using numpy/matplotlib - DLL Load Failed


I've tried just this - starting up pythonnet.exe and importing pylab, or
matplotlib, or numpy as the first import prior to clr. I still get the DLL
not found errors. Have you found any other solution?
Post by Barton
I have had tons of issues with python 2.7 and manifest issues that did
not occur in 2.6.
A short term solution would be to start python from the standard
(cpython) python.exe, import your extension libraries that don't play
nicely first, then import clr (relying on the late-bound import hook).
Post by ElMariachi
Has anyone encountered this error before? What DLL is being searched for and
not found? Any help is greatly appreciated!
import numpy
File "<stdin>", line 1, in<module>
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 142, in
<module>
import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module
from type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<modu
le>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<modul
e>
import multiarray
ImportError: DLL load failed: The specified module could not be found.
_________________________________________________
http://mail.python.org/mailman/listinfo/pythondotnet
--
View this message in context: http://old.nabble.com/Using-numpy-matplotlib---DLL-Load-Failed-tp31397569p31432493.html
Sent from the Python - pythondotnet mailing list archive at Nabble.com.

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
ElMariachi
2011-04-20 20:46:15 UTC
Permalink
I have tried, as you mentioned, importing multiarray first. It is a module
declared in numpy.core (the filename is "multiarray.pyd") though I keep
getting the same error. Any idea what else I might try?
Post by Tribble, Brett
from numpy.core import multiarray
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python27\lib\site-packages\numpy\__init__.py", line 142, in
<module>
import add_newdocs
File "c:\python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module>

from numpy.lib import add_newdoc
File "c:\python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module
from type_check import *
File "c:\python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<modu
le>
import numpy.core.numeric as _nx
File "c:\python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<modul
e>
import multiarray
ImportError: DLL load failed: The specified module could not be found.
Post by Tribble, Brett
Import multiarray first as well. Numpy is doing an import in the __init__
according to what I see here, unless I'm wrong, which is also likely.
Lather, rinse, repeat for any additional modules that fail to load.
This bug has plagued my pythondotnet usage since day 1...
--
View this message in context: http://old.nabble.com/Using-numpy-matplotlib---DLL-Load-Failed-tp31397569p31443742.html
Sent from the Python - pythondotnet mailing list archive at Nabble.com.

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
Tribble, Brett
2011-04-20 21:17:02 UTC
Permalink
Check to make sure that your pythonpath and system path are the same after you import the CLR. In other words, what are both of these set to when it works, and when it fails. Perhaps Barton has some idea what causes the underlying error.


-----Original Message-----
From: pythondotnet-bounces+btribble=ea.com-+ZN9ApsXKcEdnm+***@public.gmane.org [mailto:pythondotnet-bounces+btribble=ea.com-+ZN9ApsXKcEdnm+***@public.gmane.org] On Behalf Of ElMariachi
Sent: Wednesday, April 20, 2011 1:46 PM
To: pythondotnet-+ZN9ApsXKcEdnm+***@public.gmane.org
Subject: Re: [Python.NET] Using numpy/matplotlib - DLL Load Failed


I have tried, as you mentioned, importing multiarray first. It is a module
declared in numpy.core (the filename is "multiarray.pyd") though I keep
getting the same error. Any idea what else I might try?
Post by Tribble, Brett
from numpy.core import multiarray
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python27\lib\site-packages\numpy\__init__.py", line 142, in
<module>
import add_newdocs
File "c:\python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module>

from numpy.lib import add_newdoc
File "c:\python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module
from type_check import *
File "c:\python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<modu
le>
import numpy.core.numeric as _nx
File "c:\python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<modul
e>
import multiarray
ImportError: DLL load failed: The specified module could not be found.
Post by Tribble, Brett
Import multiarray first as well. Numpy is doing an import in the __init__
according to what I see here, unless I'm wrong, which is also likely.
Lather, rinse, repeat for any additional modules that fail to load.
This bug has plagued my pythondotnet usage since day 1...
--
View this message in context: http://old.nabble.com/Using-numpy-matplotlib---DLL-Load-Failed-tp31397569p31443742.html
Sent from the Python - pythondotnet mailing list archive at Nabble.com.

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet

_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
Barton
2011-04-23 20:22:12 UTC
Permalink
This is NOT what I have suggested. Use python.exe as installed by
python; this gives an unmanaged console app that should be able to
import your cpython extensions. THEN import clr; this activates a
late-binding of the .NET components. I use this technique successfully
to load even the most stubborn (like dynamically manifested wxWindows
for 2.7 which has the exact symptom) libraries. I may have time this
weekend to do the actual numpy test.
WBR, Barton
Post by ElMariachi
I've tried just this - starting up pythonnet.exe and importing pylab, or
matplotlib, or numpy as the first import prior to clr. I still get the DLL
not found errors. Have you found any other solution?
Post by Barton
I have had tons of issues with python 2.7 and manifest issues that did
not occur in 2.6.
A short term solution would be to start python from the standard
(cpython) python.exe, import your extension libraries that don't play
nicely first, then import clr (relying on the late-bound import hook).
Post by ElMariachi
Has anyone encountered this error before? What DLL is being searched for and
not found? Any help is greatly appreciated!
import numpy
File "<stdin>", line 1, in<module>
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 142, in
<module>
import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module
from type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<modu
le>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<modul
e>
import multiarray
ImportError: DLL load failed: The specified module could not be found.
_________________________________________________
http://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet

Loading...