使用python 3.6.1,我通过pip安装了tensorflow-gpu。
每当我执行脚本时,它都会在第一个tensorflow import语句中带有以下堆栈跟踪:
Traceback (most recent call last):
File "C:\Users\info\Desktop\Tools\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\info\Desktop\Tools\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\info\Desktop\Tools\Python36\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\info\Desktop\Tools\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\info\Desktop\Tools\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
这本书遵循了tensorflow-gpu的设置(即按照这封信的正式tensorflow文档中的步骤进行操作)。以前有人遇到过问题吗?
编辑:
我也尝试过通过pip安装tensorflow cpu,但随后出现了另一条错误消息:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
我的计算机规格:
i7 4500K @ 5GHz 英伟达1070 三星固态硬盘 32GB DDR4内存