conda安装pytorch所遇Solving environment: failed with initial frozen solve. Retrying with flexible solve.

linux下conda安装pytorch使用命令

conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch

遇到问题

Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

报错原因

python版本与pytorch版本要求发生冲突

解决方案

重新配置环境,将python版本更换为与需要下载的pytorch版本相匹配的版本。
像是我本次下载的pytorch版本为1.2.0,而我原本pytorch环境安装的python版本是3.8,所以会报错。
按照以下步骤删除及创建环境,并以我安装的pytorch版本为例,给出以下命令行。
————
conda remove -n pytorch --all
conda create -n pytorch120 python=3.7
conda activate pytorch120
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch

尝试过的方案

1 将conda更换成pip,报错原因未知
ERROR: Could not find a version that satisfies the requirement pytorch==1.2.0 (from versions: none)
ERROR: No matching distribution found for pytorch==1.2.0
2 更换镜像源,无果
  • 18
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值