Pytorch官网下载很慢

选择以下方法,关于版本对应从pytorch官网查看

官网方法

pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121

其他方法

 pip install torch==2.2.0+cu121 torchvision==0.17.0+cu121 torchaudio==2.2.0+cu121 -f https://mirrors.aliyun.com/pytorch-wheels/cu121/

注意:安装torch会自动安装numpy,若安装了的numpy版本是2.x,需要将其下调版本,因为pytorch官网推荐使用1.x版本,我这里安装的是1.24,若使用2.x版本,torch.from_numpy会报错。

Logo

分享最新的 NVIDIA AI Software 资源以及活动/会议信息,精选收录AI相关技术内容,欢迎大家加入社区并参与讨论。

更多推荐