import tensorflow时出现的“Failed to load the native TensorFlow runtime”错误解决办法

tensorflow目前有CPU和gpu两种版本,我用的是cpu版本。今天在安装tensorflow完后,在import的时候出现了“Failed to load the native TensorFlow runtime”的报错信息,报错信息下面也给出了常见错误的解决方式:
See https://www.tensorflow.org/install/install_sources#common_installation_problems

但是这个错误并不在常见错误中,看来下面的测试知道了tensorflow需要MSVC2015做底层的编译器,看来一下自己的程序确实没有这个,所以需要安装这个软件:

https://www.microsoft.com/en-us/download/details.aspx?id=53587
目前微软给出的是update3版本,修复了之前的一些bug

需要注意的是:安装完这个软件之后,要把之前的tensorflow相关包卸载之后重新再安装一次,才能解决问题。

猜你喜欢

转载自blog.csdn.net/braveheartm/article/details/83042999