pytorch,cuda8,torch.cuda.is_available return flase (ubuntu14)


因為ubuntu 系統是14.0的,安裝pytorch1.0的時候,本身已經安裝好了cuda8,在驗證gpu的時候,torch.cuda.is_available()返回false

安裝命令是:

conda install pytorch=1.0.1 cuda80 -c pytorch

但是驗證:


res = torch.cuda.is_available()
print(res)

返回false,這時候參考網上的,安裝

pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu80/torch_nightly.html

即可,如果下載過程中報錯,如下:

Looking in links: https://download.pytorch.org/whl/nightly/cu80/torch_nightly.html
Collecting torch_nightly
Downloading https://download.pytorch.org/whl/nightly/cu80/torch_nightly-1.1.0.dev20190502-cp37-cp37m-linux_x86_64.whl (620.6MB)
| | 686kB 77kB/s eta 2:14:05ERROR: Exception:
Traceback (most recent call last):

 

使用多線程下載工具下載:

aria2c --dir=./ --max-connection-per-server=16 --max-concurrent-downloads=16 --split=16 --continue=true "https://download.pytorch.org/whl/nightly/cu80/torch_nightly-1.1.0.dev20190502-cp37-cp37m-linux_x86_64.whl"

pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu80/torch_nightly.html

再跑即可以修復

 

 

 

 

 

 

 
       


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM