1、在C:\Users\“用戶名”\AppData\Roaming中創建文件夾pip

2、在pip文件夾中創建文件pip.ini

3、在pip.ini中輸入以下內容,將源換為清華源
[global]
timeout = 60000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
use-mirrors = true
mirrors = https://pypi.tuna.tsinghua.edu.cn
4、最后安裝pytorch大功告成!

