1、查看Tensorflow版本及安装环境
如何查看当前tensorflow版本:
python
import tensorflow as tf
tf.__version__
如何查看当前tensorflow的安装路径:
tf.__path__
2、找到Tensorflow安装环境
卸载Tensorflow命令
pip uninstall tensorflow
卸载完成之后 问题来了,我们有时候并不能完全将其卸载掉,这里我们找到TensorFlow安装地址
以anaconda为例,找到安装文件
下一步
接下来
这样卸载就应该完全结束了,下面 开始安装你想要的TensorFlow版本
3、安装tensorflow
启动cmd直接在命令行里运行,使用 --ignore-installed 覆盖安装:
pip install --upgrade --ignore-installed tensorflow
(推荐)
pip install --ignore-installed tensorflow-gpu==1.12.0