解决安装pytorch.cuda时出现的Solving environment错误

使用了网上大家说的更新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

即可解决

物联沃分享整理
物联沃-IOTWORD物联网 » 解决安装pytorch.cuda时出现的Solving environment错误

发表评论