pip 安装 pytorch环境

直接 pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple

 Building wheel for torch (setup.py) ... error
 ERROR: Failed building wheel for torch

失败

pip install --upgrade torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple

还是失败

ERROR: torchvision 0.5.0 has requirement torch==1.4.0, but you'll have torch 0.1.2.post2 which is incompatible.

再次尝试

pip install --upgrade torch==1.4.0 torchvision==0.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
但是还是安装失败
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement torch==1.4.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.4.0

最后找到一种新的方式:
https://pytorch.org/get-started/locally/
win10-pip-cpu

最后安装成功(还得看网速,在另一台笔记本上面就是超时了),注意是使用 pip install,而不是 conda install(安装失败)

pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

在这里插入图片描述

  • 13
    点赞
  • 44
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值