前言:
在用了一段时间conda后,我打算升级一下conda,于是就是终端输入了“conda update conda”,环境done,下载OK,最后在安装的时候出现以下错误:
Verifying transaction: | WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(187): Could not remove or rename C:\Program Files\anaconda3\.condatmp\056ecf4d-4cbb-4eec-99b0-a66ffc21ba1f. Please remove this file manually (you may need to reboot to free file handles)
/ WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(187): Could not remove or rename C:\Program Files\anaconda3\.condatmp\1481fd4e-2803-467b-8ea5-a8f64678fb4e. Please remove this file manually (you may need to reboot to free file handles)
- WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(187): Could not remove or rename C:\Program Files\anaconda3\.condatmp\321a8197-a79e-4ab8-b3d5-0396389cc09a. Please remove this file manually (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(187): Could not remove or rename C:\Program Files\anaconda3\.condatmp\495ca8d4-edf2-4b05-9a4c-5983c7046a4f. Please remove this file manually (you may need to reboot to free file handles)
\ WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(187): Could not remove or rename C:\Program Files\anaconda3\.condatmp\4edd9e5a-4d56-474a-bd04-1a44ef6c997f. Please remove this file manually (you may need to reboot to free file handles)
由于报错数量巨大,所以我就去查找原因打算解决
过程:
于是我找到了这篇文章,他按照他找到的解决办法操作,然后失败,只能老老实实按警告的提示路径删除文件后成功
但是我这次升级要大几十个路径删除,肯定这样操作是不行的,所以经过研究找到了真正的解决办法
本文解决办法:
因为conda对文件的修改都在这个叫anaconda3的文件夹下,所以我就右键点击文件夹在“属性-安全-高级-更改权限”里边进行修改,将访问里边没有勾选修改的都勾选修改,应用于都改成“此文件夹、子文件件和文件”,之后再次conda update conda就顺利完成了!