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 envir
·
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 更换镜像源,无果
更多推荐
所有评论(0)