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"
...
你有没有可能用pip安装了那些特定的软件包?如果是这样,那么损坏的目录可能是pip在卸载包(或者在准备更新包时卸载包)时创建的临时目录。在
我翻遍了pip源代码,发现了this snippet,显然它只用于卸载软件包:
如果这些文件就是这样的,那么您可以安全地删除它们。在
相关问题 更多 >
编程相关推荐