因为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

再跑即可以修复

 

 

 

 

 

 


 
                    
            
                

相关文章:

  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2021-09-09
  • 2021-12-05
  • 2022-12-23
  • 2021-11-13
猜你喜欢
  • 2021-09-02
  • 2021-04-09
  • 2021-05-01
  • 2021-12-03
  • 2022-12-23
  • 2021-12-29
  • 2021-11-27
相关资源
相似解决方案