天天看點

Ubuntu16.04+Pytorch1.4.0+cuda10.0的pip安裝

當直接按照PyTorch官網安裝時,

pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
           

輸入:

輸出:

輸入:

nvcc -V
           

輸出:

是以,此時pytorch的cuda版本和系統的cuda版本是不比對的。

解決方法:

pip install torch===1.4.0+cu100 torchvision===0.5.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html
           

即可解決。

繼續閱讀