1. 程式人生 > >在LInux/ubuntu上安裝特定版本的 Pytorch ,例如 0.3.1版本

在LInux/ubuntu上安裝特定版本的 Pytorch ,例如 0.3.1版本

指令

conda install pytorch=0.3.1 torchvision cuda90 -c pytorch

注意事項:

1   pytorch=0.3.1  (0.3.1 改為你要安裝的pytorch版本)  檢視pytorch版本號點我

2   cuda90 改為你自己的cuda版本

在安裝pytorch時有時候會報錯,其中出現”CondaHTTPError: HTTP None None for url…..”這類錯誤時

基本是因為有些庫需要外網才能下載,所以我們需要使用conda的清華映象。

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

然後再執行 

conda install pytorch=0.3.1 torchvision cuda90 -c pytorch

參考文章

加油  2018.10.1