安装pytorch.cuda时出现Solving environment: failed with initial frozen solve. Retrying with flexible solve

使用了网上大家说的更新conda,以及更换镜像均无法解决。便尝试使用pip安装指令。

 1、将清华镜像源添加到PIP的搜索目录中,打开ANACONDA PROMPT,键入

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

 2、进入PYTORCH官网,选择适合自己电脑系统的版本,在这里查看不同显卡驱动所对应的CUDA版本。

 复制安装指令

3、在anaconda prompt切换到自己要安装pytorch的环境。再键入上边复制的安装指令。同时加上

-i https://pypi.tuna.tsinghua.edu.cn/simple 

即键入:

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116 -i https://pypi.tuna.tsinghua.edu.cn/simple

即可解决

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年11月7日
下一篇 2023年11月7日

相关推荐