Author Topic: Error With: import scipy  (Read 2199 times)

newbie73

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Error With: import scipy
« on: December 21, 2010, 11:23:37 PM »
I am unable to import the scipy module. Including a module with the following line:

Code: [Select]
import scipy

throws an unhandled exception:
Code: [Select]
2010-12-21 17:21:30,915 - ERROR : Error importing 'options': DLL load failed: A dynamic link library (DLL) initialization routine failed.
2010-12-21 17:21:30,915 - ERROR : Traceback (most recent call last):
2010-12-21 17:21:30,915 - ERROR :   File "pyxll", line 402, in _open
2010-12-21 17:21:30,915 - ERROR :   File "C:\Dev\libs\pyxll\examples\options.py", line 15, in <module>
2010-12-21 17:21:30,915 - ERROR :     import scipy
2010-12-21 17:21:30,915 - ERROR :   File "C:\Python26\lib\site-packages\scipy\__init__.py", line 78, in <module>
2010-12-21 17:21:30,915 - ERROR :     from numpy import show_config as show_numpy_config
2010-12-21 17:21:30,915 - ERROR :   File "C:\Python26\lib\site-packages\numpy\__init__.py", line 138, in <module>
2010-12-21 17:21:30,915 - ERROR :     import add_newdocs
2010-12-21 17:21:30,915 - ERROR :   File "C:\Python26\lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
2010-12-21 17:21:30,930 - ERROR :     from lib import add_newdoc
2010-12-21 17:21:30,930 - ERROR :   File "C:\Python26\lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
2010-12-21 17:21:30,930 - ERROR :     from type_check import *
2010-12-21 17:21:30,930 - ERROR :   File "C:\Python26\lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
2010-12-21 17:21:30,930 - ERROR :     import numpy.core.numeric as _nx
2010-12-21 17:21:30,930 - ERROR :   File "C:\Python26\lib\site-packages\numpy\core\__init__.py", line 5, in <module>
2010-12-21 17:21:30,930 - ERROR :     import multiarray
2010-12-21 17:21:30,930 - ERROR : ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 581
  • Karma: +13/-1
    • View Profile
Re: Error With: import scipy
« Reply #1 on: December 22, 2010, 12:36:30 AM »
Hi,

I suspect this is because you are using the Enthought distribution of NumPy. The current version available has a problem that means it cannot be embedded in Excel.

To fix this, you need to remove the manifest resources from the numpy pyd files using cff explorer or any other PE editor.

Enthought are aware of this and are looking at the problem.

The version you can download from the numpy website works fine with PyXLL.

Regards,
Tony