怎样正确在pycharm运行tensorflow-gpu

我在网上尝试寻找正确安装与运行tensorflow-gpu的方法。
最终卡在了无法导入tensorflow,但是却可以.出联想方法,求助。
图片说明

全部报错如下:
Traceback (most recent call last):
File "C:\Users\machenike\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\machenike\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\machenike\Anaconda3\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 "C:\Users\machenike\Anaconda3\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\machenike\Anaconda3\lib\imp.py", line 342, 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:/PycharmProjects/DeepLearning2/demo.py", line 1, in
import tensorflow
File "C:\Users\machenike\Anaconda3\lib\site-packages\tensorflow__init__.py", line 28, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\machenike\Anaconda3\lib\site-packages\tensorflow\python__init__.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\machenike\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\machenike\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\machenike\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\machenike\Anaconda3\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 "C:\Users\machenike\Anaconda3\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\machenike\Anaconda3\lib\imp.py", line 342, 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.

1个回答

你的cpu和gpu的型号是什么
之前我有用垃圾电脑(CPU是Core 2 Quad Q9400)报类似的错误,后来发现是因为这个cpu不支持avx2 fma3造成的,换了sse版本的,就好了。
还有,检查cuda sdk、cudnn的版本是否匹配,是否安装到位。

wudishuaimie
啊咩 [耶] 回复繁华三千东流水: 你好,请问你解决了吗?我的问题和你的一样,配置也是差不多的
5 个月之前 回复
qq872890060
繁华三千东流水 在网上看有人说使用tensorflow1.11.0,但是我的Pip中就没有这个版本,最低都是1.13.0的
10 个月之前 回复
qq872890060
繁华三千东流水 我的cpu是i7-8750,gpu是1060,版本应该是匹配的,9.0的都是,环境变量也配置了,我的tensorflow-gpu是使用pip下载的,版本是1.14.0
10 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问