解决方法如下:
pip uninstall tensorflow
(以便重新安装tensorflow的正确版本)
pip install tensorflow==1.14.0rc1
注意:在安装过程中,终端有一条信息:
Installing collected packages: tensorflow
Attempting uninstall: tensorflow
Found existing installation: tensorflow 1.13.1
Uninstalling tensorflow-1.13.1:
Successfully uninstalled tensorflow-1.13.1
import tensorflow
,在搜索阶段,点击
tensorflow==1.13.1
在找到
1.14.0rc1
版本。阿尔托
pip list
仅显示
tensorflow==1.14.0rc1
但不是
张量流==1.13.1
也可能是由于其内部搜索或重复的包解析机制。