下载pytorch
pythorch gpu版本需要在官网自行根据gpu的版本进行pip语句的使用,下附官网地址:
https://pytorch.org/get-started/locally/
本人的gpu是12.1,但下了cuda 11.7最后选择了这个语句:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
成功!!
下载d2l
下载d2l也出现了同样的问题,关掉ip代理也没有办法解决问题。如有同样的情况请尝试:
在Windows下:
C:\用户\Administrator\下,新建pip文件夹,在创建pip.ini文件(先创建txt,复制下面内容,修改文件后缀ini),拷贝下面代码进去,保存;
这个目录针对与不同pc基本类似;
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
或者
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
第一个内容没有成功但是第二个成功了!!!!