先參考Ma1dives寫的
WIN10搭建深度學習環境 GTX1080+CUDA9.0+cuDNN7.0+Python3.6+Tensorflow1.6.0
CUDA和Tensorflow版本需要搭配使用,具體怎么配對,請度娘
這篇文章用的是CUDA9.0+ Tensorflow1.6,
本文使用CUDA10.0 + Tensorflow 1.14.0
1.Pip使用Tsing鏡像:
pip install tensorflow-gpu==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install tensorflow-gpu==1.14.0 --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple 更新使用
2. 'No module named 'lib.utils.cython_bbox'
這個問題的根源是 lib.utils 下沒有cython_bbox這個文件可以import,只有一個cython_bbox.pyx文件;
pyx文件是用Cython寫的類似C語言風格的文件,只有通過編譯腳本setup.py編譯后才能轉換成python可以調用的文件;
因此我們首先在終端進入 /lib/utils 文件夾,運行命令即可:
python setup.py build_ext --inplace
3.安裝 tensorflow 1.14 UnicodeDecodeError: 'utf-8' codec can't decode ## invalid start byte的問題之解決
File "C:\DeepLearning\Anaconda3\envs\tensorflow\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str return s.decode('utf_8')
找到__init__.py,使用Notepad++打開,
return s.decode(sys.__stdout__.encoding) 應改為 return s.decode('cp936')