ubuntu16.04卸载tensorflow0.11版本,安装tensorflow1.1.0版本

时间:2023-03-09 09:41:25
ubuntu16.04卸载tensorflow0.11版本,安装tensorflow1.1.0版本

卸载旧版本:

pip uninstall tensorflow

安装新版本:

sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.1.0-cp27-none-linux_x86_64.whl

(备注:我的系统版本是

lcx@lcx-OptiPlex-390:~$ uname -a
Linux lcx-OptiPlex-390 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

验证安装是否成功

进入python环境

>>>import tensorflow as tf
>>>hello=tf.constant('hello world')
>>>sess=tf.Session()
>>>print(sess.run(hello))
hello world