首先我的电脑显卡是1650ti,适合的cuda版本应该是11.3,安装的cudnn版本是8.2.1。现在想要运行一段代码,需要的环境是tensorflow-gpu==1.13.1,keras==2.1.5。使用anaconda配置了相应的环境
python的版本是3.6.13
import tensorflow之后报错
Traceback (most recent call last):
File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "E:\anaconda3\envs\vgg\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 "E:\anaconda3\envs\vgg\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "E:\anaconda3\envs\vgg\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 "<stdin>", line 1, in <module>
File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "E:\anaconda3\envs\vgg\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "E:\anaconda3\envs\vgg\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 "E:\anaconda3\envs\vgg\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "E:\anaconda3\envs\vgg\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.
CSDN了一下,一个原因是缺少库MSVCP140.dll
经检查并不是
还有可能是缺少用于Visual Studio 2015的Visual C ++可再发行组件而引起的
经检查也不是
还有一个原因是TensorFlow和cuda的版本不匹配
搜索了一下TensorFlow_gpu1.13.1对应的cuda版本好像是10.1,但是cuda10.1和我的显卡不匹配,所以这个问题应该怎么解决呢