ImportError: DLL load failed: The specified module could not be found.
I've installed CNTK via cmd prompt using pip3 install C:\folder\where\it\is\cntk-2.0-cp36-cp36m-win_amd64.whl as it's not listed in the Available packages list. I also used this method to get around the issue with scipy not installing when using the pycharm install method. Scipy works, CNTK does not.
CNTK is listed in File > Settings > Project > Project interpreter along with every other package and in the code editor import cntk doesn't flag as "No module named cntk" and print(cntk.__version__) doesn't flag an error either. however once I run the script I get.
Traceback (most recent call last):
File "C:\Users\Boogz\AppData\Local\Programs\Python\Python36\lib\site-packages\cntk\cntk_py.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\Boogz\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'cntk._cntk_py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Boogz/PycharmProjects/untitled1/Test.py", line 3, in <module>
import cntk
File "C:\Users\Boogz\AppData\Local\Programs\Python\Python36\lib\site-packages\cntk\__init__.py", line 10, in <module>
from . import cntk_py
File "C:\Users\Boogz\AppData\Local\Programs\Python\Python36\lib\site-packages\cntk\cntk_py.py", line 21, in <module>
_cntk_py = swig_import_helper()
File "C:\Users\Boogz\AppData\Local\Programs\Python\Python36\lib\site-packages\cntk\cntk_py.py", line 20, in swig_import_helper
return importlib.import_module('_cntk_py')
File "C:\Users\Boogz\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: The specified module could not be found.
Any ideas?
Please sign in to leave a comment.
Please try to run this script with the same interpreter as you use in PyCharm in the command line. Do you have the same error?
Hi Anna, thanks for the reply,
To answer your question, No, I don't get the same error when I run the script from command prompt. It returns 2.0 as expected.
Though I have to run "set PATH=%PATH%;C:\Users\Boogz\AppData\Local\Programs\Python\Python36" every time I open a new command prompt. Not sure if this is relevant or normal as I generally don't work with command prompt.
I have the same issue, but I can't afford working with a command prompt. I installed a module with Pycharm, and Pycharm won't detect it.
Any idea how to solve this issue?