解决PyTorch安装问题:Solving environment循环和失败的解决方案

Solving environment: 一直循环/Solving environment: failed with initial frozen solve.

在网上找了半天的资料。更新conda,更换国内源,去掉conda安装命令中的-c pytorch都试过了,还是一直停在solving environment步骤。

最后找到了最简单实用的方法,直接使用anaconda环境下自带的pip安装,完美运行。


不过我是在更换国内源后才用pip安装的,不知道有咩有影响。这里也把换国内源的过程贴出来

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

另外,还需要说明,pytorch好像对python的版本有要求,具体可以查看官网https://pytorch.org/get-started/locally/#windows-python,目前windows下支持的python版本是3.7到3.9

物联沃分享整理
物联沃-IOTWORD物联网 » 解决PyTorch安装问题:Solving environment循环和失败的解决方案

发表评论