卸载旧版本:

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

  

 

posted on 2018-03-13 11:36  chamie  阅读(827)  评论(0编辑  收藏  举报