使用指令 pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113 安装 torch
、torchvision
和 torchaudio出现下面报错,为超时问题,
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out.,解决如下
可以尝试分别安装 torch
、torchvision
和 torchaudio
,以减少同时下载多个包导致的超时问题:pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
pip install torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
pip install torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113