tensorflow安装及导入异常处理
cpu版安装方法
pip install --ignore-installed --upgrade tensorflow
tesorflow导入异常
正常导入import tensorflow,会有一大段异常,最后面几句是,
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是基于VC++2015开发的,所以需要下载安装VisualC++ Redistributable for Visual Studio 2015 来获取MSVCP140.DLL的支持。下载安装即可解决问题。
注意:安装后,需要重新进入python