如何windows下安裝Tensorflow2.0.0正式版?
1、首先安裝numpy(安裝過就算了)
推薦國內安裝源!親測成功!!!
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
2、使用清華源安裝Tensorflow GPU版本
pip install -U tensorflow-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple
3、使用清華源安裝Tensorflow CPU版本
pip install -U tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple
4、測試是否安裝成功!
在cmd命令行中輸入ipython進入ipython交互式終端,然後輸入
import tensorflow as tf
沒有錯誤就證明成功了!
5、查看Tensorflow版本號
tf.__version__
一切都正常說明安裝成功了,恭喜!
如果遇到上述安裝成功,但是在import tensorflow as tf 出現下面的錯誤情況!
Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
說明你的tensorflow和cuda版本不一致,建議你安裝對應版本的cuda或者降低tensorflow版本;再或者只是用CPU版本
歡迎一起交流學習!嘿嘿