错误内容:
==> WARNING: A newer version of conda exists. <==
current version: 22.9.0
latest version: 23.7.2Please update conda by running
$ conda update -n base -c defaults conda
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename C:\Users\a2693\Anaconda3\pkgs\cuda-nvrtc-11.7.99-0.tar.bz2. Please remove this file manually (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename C:\Users\a2693\Anaconda3\pkgs\libcublas-dev-11.10.3.66-0.tar.bz2. Please remove this file manually (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename C:\Users\a2693\Anaconda3\pkgs\libcufft-dev-10.7.2.124-0.tar.bz2. Please remove this file manually (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename C:\Users\a2693\Anaconda3\pkgs\libcusolver-dev-11.4.0.1-0.tar.bz2. Please remove this file manually (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename C:\Users\a2693\Anaconda3\pkgs\libnpp-dev-11.7.4.75-0.tar.bz2. Please remove this file manually (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename C:\Users\a2693\Anaconda3\pkgs\pytorch-2.0.1-py3.9_cuda11.7_cudnn8_0.tar.bz2. Please remove this file manually (you may need to reboot to free file handles)
前情:
头一天安装还比较正常,但是因为停电使用的热点+没有添加镜像源,大的包(50MB以上的)基本上都安装失败了。
今天重启电脑,本来想直接用anaconda prompt的,但是很慢,(base) C:\Users\a2693>一直出现不了。所以进入anaconda目录用cmd进入的,然后照常使用conda activate pytorch和conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia命令,结果首先就是报了个
Collecting package metadata (current_repodata.json): done
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.
Collecting package metadata (repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/r/noarch/repodata.json>
Elapsed: -An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.'https//repo.anaconda.com/pkgs/r/noarch'
的错误,后来查了下,添加了清华的镜像源conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/,再继续install包,
Collecting package metadata (current_repodata.json): done
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.
Collecting package metadata (repodata.json): done
Solving environment: done(第二次成功了)
接着就是开头的报错。虽然是报错,但并未退出安装,packages的列表也还是照常列出,并且看了一下,确实是昨天安装失败的部分(本来应该2g多,昨天安装了一些小的,今天剩下1.96g),数字对的上。这时候我发现anaconda prompt可以用了,所以就重新用anaconda prompt安装,不过这个cmd也没关。
用anaconda prompt安装时出现了
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
的错误,按照这个conda 解决An HTTP error occurred when trying to retrieve this URL.(已经更新清华源但也无解的解决方法) 更改了condarc文件后执行conda claen -i,再继续安装包的时候发现原本只剩1.96g的包又变成了2.14g,但是奇怪的是用everything搜了一个小包,还在,并没有被删去,不过用pip list没有显示昨天已经安装的包;以防万一我又回到cmd的窗口下执行install,那边也从1.96变成了2.14,所以可能确实没了吧。接着就在anaconda prompt里照常安装了。并且除了开头的记录,后面也没有再报过warning的错误。