iPython: DLL load failed: The specified module could not be found; plain Python fine -
i keep getting (well known) error in ipython. yet, 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" more information. ipython 2.0.0 -- enhanced interactive python. ? -> introduction , overview of ipython's features. %quickref -> quick reference. -> python's own system. object? -> details 'object', use 'object??' details. in [1]: import test1 --------------------------------------------------------------------------- importerror traceback (most recent call last) <ipython-input-7-ddb30f03c287> in <module>() ----> 1 import test1 importerror: dll load failed: specified module not found.
python (not loads fine, 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" more information. >>> import test1 >>>
now, dependency walker on test1.pyd shows this
[ ? ] libgcc_s_dw2-1.dll error opening file. system cannot find file specified (2). [ ? ] libstdc++-6.dll error opening file. system cannot find file specified (2). [ ? ] python33.dll error opening file. system cannot find file spec
i overwrote sys.path in ipython 1 plain python. file test1.pyd 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 import work in plain python not in ipython?
i have same problem occurred. after hours looking , thinking. difference environment variables between interpret ide choose use. ( plain python , ipython or pycharm etc.) think can use %env
in ipython check text. use (works in python 3.7)
import os os.environ
check text. if there differences. many should set right 1 before run. there many way set envs. example
1、os.environ['环境变量名称']='环境变量值' #其中key和value均为string类型 2、os.putenv('环境变量名称', '环境变量值')
hope helps you.~~~///(^v^)\\~~~
Comments
Post a Comment