【深度学习】安装pytorch

1、官网:https://pytorch.org/

在这里插入图片描述

2、cmd中运行:
注意:直接复制Run this Command 里面的安装代码
注意:把pip3的3删除

第一步:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple http://download.pytorch.org/whl/cu80/torch-0.4.1-cp36-cp36m-win_amd64.whl

第二步:
pip install torchvision

注意:第一步和第二步可以合并为pip install -i https://pypi.tuna.tsinghua.edu.cn/simple http://download.pytorch.org/whl/cu80/torch-0.4.1-cp36-cp36m-win_amd64.whl torchvision

3、安装技巧:

清华镜像站:直接搜做 pip install -i 下载速度快
https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

不管什么pip 加上 -i https://pypi.tuna.tsinghua.edu.cn/simple 会很快

4、检查是否安装成功:python
import torch

猜你喜欢

转载自blog.csdn.net/ZHANGHUIHUIA/article/details/83998756