I keep getting this (known) error in iPython. However, the same import works fine in plain Python. (Python 3.3.5, see details below)
IPython:
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] Type "copyright", "credits" or "license" for more information. IPython 2.0.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython features. %quickref -> Quick reference. help -> Python own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import test1 --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-ddb30f03c287> in <module>() ----> 1 import test1 ImportError: DLL load failed: The specified module could not be found.
Python (not only does it load perfectly, but it also works):
$ python Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import test1 >>>
Now, Dependency Walker on test1.pyd shows it
[ ? ] LIBGCC_S_DW2-1.DLL Error opening file. The system cannot find the file specified (2). [ ? ] LIBSTDC++-6.DLL Error opening file. The system cannot find the file specified (2). [ ? ] PYTHON33.DLL Error opening file. The system cannot find the file spec
I even rewritten sys.path in iPython with one of simple Python. The file test1.pyd is located in C: \ Test.
['c:\\Test', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\python33.zip', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\DLLs', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\lib', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\lib\\site-packages', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\lib\\site-packages\\FontTools', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\lib\\site-packages\\win32', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\lib\\site-packages\\win32\\lib', 'c:\\WinPython-32bit-3.3.5.0\\python-3.3.5\\lib\\site-packages\\Pythonwin']
Why will import work in plain Python, but not in iPython?
python ipython
John H Aug 31 '15 at 0:58 2015-08-31 00:58
source share