目录
问题
// 看关键代码
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "D:\JetBrains\Envs\py37-common\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
……
File "D:\JetBrains\python\python37\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.
原因
安装TF 2.1.0需要msvcp140_1.dll文件,但是老的版本没有,VS2019可以可以提供独立安装。
解决
方法一:
打开官网https://www.tensorflow.org/install/errors,下载对应模块→解压即可。
官网无法下载的可以点击github,存了一个64位安装包做备用。
方法二:不安装最新版的TF (注意v1和v2的区别)
pip install tensorflow==1.14.0