有关 TensorFlow 与 Cuda 等版本对应关系的链接:https://www.tensorflow.org/install/source#linux
是的,我最近开始疯狂写报错来水文章了。
Traceback (most recent call last):
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "D:\Anaconda3\envs\newest\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "D:\Anaconda3\envs\newest\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/Machine Learing/deep-hawkes-graphwave/deep_learning/run_sparse.py", line 5, in <module>
import tensorflow as tf
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\Anaconda3\envs\newest\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "D:\Anaconda3\envs\newest\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "D:\Anaconda3\envs\newest\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 找不到指定的模块。
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
因为那个,TensorFlow
、Python
、Cuda
、cudnn
以及显卡驱动的版本问题错综复杂,如果排列组合没搞对,可能就会出现上述问题。所以呢,找对一个正确的版本组合是非常重要滴。
下面只陈述 Windows 10
环境下的一种组合,嫌麻烦的同学照着配一套就可以了:
NVIDIA
显卡驱动的版本为 430.86
。
我有想写一个快速配环境的教程,写好后贴过来。各位再见。
总算是写了一个,不过配环境这种事情,变量太多,时效性很短,仅供诸君参考,而非万能灵药。地址:
https://blog.csdn.net/xovee/article/details/101203830
Win10: ImportError: DLL load failed: The specified module could not be found. (June 4, 2019). Retrieved from https://github.com/tensorflow/tensorflow/issues/22794