在Windows上运行Conda清洁时,为什么我没有文件权限?
我在Windows 11上使用了Anaconda3和Miniconda。我不知道发生了什么,但是当我执行任何子命令时,我的Conda似乎没有文件权限。
具体来说,即使我删除了某个软件包(无论是否在虚拟环境中),它总是会提示我的卸载成功,但是当我进入安装目录时,我会发现该软件包的文件仍然存在。
另一个奇怪的事情是,当我运行conda清洁-All -y
时,它总是提示一长串警告,即由于文件许可问题,由于已安装的各种软件包无法删除。特定日志如下:
Will remove 153 (77.9 MB) tarball(s).
Will remove 1 index cache(s).
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\cache
Will remove 28 (62.7 MB) package(s).
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\anyio-3.6.1-py310h5588dad_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\ca-certificates-2022.3.29-haa95532_1
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2021.10.8-py39haa95532_2
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2022.5.18.1-py310h5588dad_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2022.5.18.1-py39hcbf5309_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2022.6.15-py310h5588dad_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\conda-4.12.0-py39haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\conda-content-trust-0.1.1-pyhd3eb1b0_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\cryptography-36.0.0-py39h21b164f_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\cython-0.29.28-py310hd77b12b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\dnspython-1.16.0-py310haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\eth-hash-0.2.0-py_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\h2-4.1.0-pyhd8ed1ab_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\importlib_metadata-4.11.4-hd8ed1ab_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\openssl-1.1.1n-h2bbff1b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\pip-21.2.4-py310haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\python-snappy-0.6.0-py310hd77b12b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\python_abi-3.10-2_cp310
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\python_abi-3.9-2_cp39
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\six-1.16.0-pyhd3eb1b0_1
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\snappy-1.1.9-h6c2663c_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\sqlite-3.38.2-h2bbff1b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\tqdm-4.63.0-pyhd3eb1b0_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\trio-0.19.0-py310haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\typing-extensions-4.2.0-hd8ed1ab_1
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\ujson-5.1.0-py310hd77b12b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\urllib3-1.26.8-pyhd3eb1b0_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\vc-14.2-h21ff451_1
There are no tempfile(s) to remove.
There are no logfile(s) to remove.
我一直认为这是文件权限问题,但是我敢肯定我没有调整这些内容,它们以前工作正常(也许是Win11问题?)。更重要的是,我试图为所有用户组设置完整的权限,问题仍然存在。所以这可能是一个更深的问题?
目前,我对如何解决这个问题完全毫无头绪,我应该做什么测试以进一步识别问题?还是有任何解决方案可以尝试?
I'm using Anaconda3 and Miniconda on Windows 11. I don't know what happened but my conda seems not to have file permissions when I execute any subcommands.
Specifically, even if I remove a certain package (whether in a virtual environment or not), it always prompts me that the uninstallation is successful, but when I go to the installation directory, I will find that the file of that package is still there.
Another strange thing is that when I run conda clean --all -y
, it always prompts a long list of warnings that the various packages that have been installed cannot be deleted due to file permission issues. The specific logs are as follows:
Will remove 153 (77.9 MB) tarball(s).
Will remove 1 index cache(s).
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\cache
Will remove 28 (62.7 MB) package(s).
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\anyio-3.6.1-py310h5588dad_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\ca-certificates-2022.3.29-haa95532_1
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2021.10.8-py39haa95532_2
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2022.5.18.1-py310h5588dad_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2022.5.18.1-py39hcbf5309_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\certifi-2022.6.15-py310h5588dad_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\conda-4.12.0-py39haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\conda-content-trust-0.1.1-pyhd3eb1b0_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\cryptography-36.0.0-py39h21b164f_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\cython-0.29.28-py310hd77b12b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\dnspython-1.16.0-py310haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\eth-hash-0.2.0-py_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\h2-4.1.0-pyhd8ed1ab_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\importlib_metadata-4.11.4-hd8ed1ab_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\openssl-1.1.1n-h2bbff1b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\pip-21.2.4-py310haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\python-snappy-0.6.0-py310hd77b12b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\python_abi-3.10-2_cp310
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\python_abi-3.9-2_cp39
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\six-1.16.0-pyhd3eb1b0_1
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\snappy-1.1.9-h6c2663c_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\sqlite-3.38.2-h2bbff1b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\tqdm-4.63.0-pyhd3eb1b0_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\trio-0.19.0-py310haa95532_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\typing-extensions-4.2.0-hd8ed1ab_1
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\ujson-5.1.0-py310hd77b12b_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\urllib3-1.26.8-pyhd3eb1b0_0
WARNING: cannot remove, file permissions: D:\miniconda3\pkgs\vc-14.2-h21ff451_1
There are no tempfile(s) to remove.
There are no logfile(s) to remove.
I've always thought it was a file permissions issue, but I'm sure I haven't tweaked these things, they worked fine before (perhaps a win11 issue?). What's more, I tried to set full permissions to all user groups, the problem still exists. So it could be a deeper problem?
At the moment I'm completely clueless as to how to fix this, what tests should I do next to further identify the problem? Or is there any solution to try?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您很可能没有使用完整的系统管理员特权开始终端。
点击键盘上的Windows“ start”按钮,然后键入“ CMD”以获取Windows命令控制台(CMD.EXE),但请确保您选择“作为管理员运行”以获得完整的管理员特权。
窗口打开后,窗口顶部的命令控制台“标题栏”必须说“管理员:命令提示符”,否则您没有系统管理员特权。
然后您应该看到一个看起来像这样的命令控制台窗口:
You most likely did not start your terminal with full System Administrator privileges.
Tap the Windows "Start" button on your keyboard, then type "cmd" to get a Windows Command Console (cmd.exe), but make sure that you select "Run As Administrator" in order to get full administrator privileges.
Once the window opens up, the Command Console "Title Bar" at the top of the window must say "Administrator: Command Prompt", otherwise you do not have system admin privileges.
You should then see a Command Console window that looks like this: