方法有两种

加长超时时间

pip3 install --default-timeout=100 pytorch

下载离线安装(推荐,毕竟网速不好)

安装的时候使用国内源 ,会自动显示下载地址。然后使用迅雷下载,

-i https://pypi.tuna.tsinghua.edu.cn/simple

安装方式:

pip3 install ./torch-1.13.1-cp37-cp37m-manylinux1_x86_64.whl