0

On Windows7, I have a module installed via an executable.

If I go to the command line, import mymodule works ok.

However, if I open spyder, on the python console it fails:

>>> import mymodule
  File "D:\anaconda32\lib\site-packages\mymodule.py", line 28, in <module>
    _mymodule = swig_import_helper()
  File "D:\anaconda32\lib\site-packages\mymodule.py", line 20, in swig_import_helper
    import _mymodule
ImportError: DLL load failed: The specified procedure could not be found.

On the IPython console in Spyder the module imports ok. Although, on starting up, I get the following message repeated twice:

Kernel died, restarting

Can anyone explain what is happening here?

I have tried purging the system of python and re-installing.

Following other similar questions I've examined mymodule.pyd and found some warnings:

enter image description here

I'm unsure what steps to take next, any ideas?

Similar, but not duplicate, questions:

DLL load failed with PyQGIS

DLL load failed with scipy.optimize?

How to install TensorFlow on Windows?

ImportError: DLL load failed: The specified procedure could not be found. Python

Community
  • 1
  • 1
Lee
  • 29,398
  • 28
  • 117
  • 170
  • Is `_mymodule.pyd` in `sys.path`? – bzrr Nov 22 '16 at 17:04
  • @Jovito yes - it's in `D:\anaconda32\DLLs` which is in `sys.path` – Lee Nov 22 '16 at 17:22
  • Are you sure that you are compiling your DLL (`_mymodule.pyd`) as a 32-bit library? – Jens Munk Nov 22 '16 at 20:34
  • @JensMunk fairly sure - it is installed via a third party executable - devs say it is 32-bit. Is there an easy way to double check? – Lee Nov 23 '16 at 09:30
  • Can you see if the library is linked to the same python that you're running? Does your python work as normal otherwise? I've had issues with the kernel dying while updates were happening, but that should affect anything you do in python. – Daniel Underwood Nov 25 '16 at 05:51

0 Answers0