tensorflow报错:Failed to load the native TensorFlow runtime.

CPU版tensorflow

import tensorflow as tf

pycharm报错如下:

Failed to load the native TensorFlow runtime.

 

原因:未更新tensorflow的版本

 

解决办法如下:

1.打开anaconda,切换到tensorflow对应的python终端,比如py35(默认为base)

2.输入pip install --upgrade --ignore-installed tensorflow

3.回车,等待tensorflow更新完毕

4. 切换至pycharm,再次run原先的.py文件,编译成功!

 

 

总结:

Failed to load the native TensorFlow runtime.

可能是由于tensorflow的版本过低所致

版本更新后,问题解决!

你可能感兴趣的:(tensorflow,Python)