ubuntu---记录.简单一句话安装tf

卸载
sudo pip3 uninstall tensorflow
sudo pip3 uninstall tensorflow-gpu
sudo pip3 uninstall tensorflow-gpu==1.15.0rc2


安装
sudo pip3 install tensorflow==1.15.0
sudo pip3 install tensorflow-gpu
sudo pip3 install tensorflow-gpu==1.15.0rc2


查看是否安装成功
Installing collected packages: tensorflow-gpu
Successfully installed tensorflow-gpu-1.15.0rc2
u@u160406:~$ python
Python 3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> print(tf.__version__)
1.15.0-rc2
>>> 


u@u160406:~$ python -c "import tensorflow as tf; print(tf.__version__)"
1.15.0-rc2
u@u160406:~$ 


(py3) u@u160406:~/Virtualenv/py3$ python -c "import tensorflow as tf; print(tf.__version__)"
1.13.0-rc1

 

posted on 2019-10-14 12:46  WP的烂笔头  阅读(377)  评论(0编辑  收藏  举报