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

 

上一篇:mac_os安装Python,以及pip3以及pip


下一篇:关于解决Ubuntu16.04中pip和pip3同时指向Python3.5的问题