https://pypi.tuna.tsinghua.edu.cn/simple/torch/
pytorch 清华源
pip 默认为系统的python2.7
pip3 为安装的最高版本
linux安装的也是 whl?
pip install torch1.7.0+cu92 torchvision0.8.1+cu92 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
加上镜像 -i
pip3 install torch1.7.0+cu92 torchvision0.8.1+cu92 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html -i https://mirrors.aliyun.com/pypi/simple/
http改成https 改成可信任
上面是清华的镜像源,现阶段已不可使用,提供下面几个镜像源用来参考。
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
清华和科大的镜像已经挂掉了,所以题主在这里使用的是阿里云的镜像,最终的pip命令如下:
阿里云好像是可以用的
pip3 install torch1.2.0+cu92 torchvision0.4.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html -i http://mirrors.aliyun.com/pypi/simple/ some-package
后面有个 some-package?
安装对应的cudnn。根据cuda版本选择对应的cudnn进行安装。点我进行下载
https://developer.nvidia.com/rdp/cudnn-archive
Anaconda了解和安装
采用Anaconda进行python环境的管理是一个很高效的解决方案。从仓库下载对应版本的软件进行安装。点我下载。
https://repo.anaconda.com/archive/index.html
https://pytorch.org