你是否可能使用pip安装了这些特定的软件包?如果是这样,那么被破坏的目录可能就是pip在卸载软件包(或在卸载软件包以准备更新软件包时)创建的临时目录。
我查阅了pip源代码,发现这段片段显然仅用于卸载软件包时:
class AdjacentTempDirectory(TempDirectory):
"""Helper class that creates a temporary directory adjacent to a real one.
Attributes:
original
The original directory to create a temp directory for.
path
After calling create() or entering, contains the full
path to the temporary directory.
delete
Whether the directory should be deleted when exiting
(when used as a contextmanager)
"""
# The characters that may be used to name the temp directory
# We always prepend a ~ and then rotate through these until
# a usable name is found.
# pkg_resources raises a different error for .dist-info folder
# with leading '-' and invalid metadata
LEADING_CHARS = "-~.=%0123456789"
...
如果这些文件确实是那样的话,那么您可以安全地将它们删除。
conda clean --all --dry-run
进行检查。 - darthbithpip clean
命令? - studioj