Mit*_*ril 8 python pip anaconda python-packaging
今天去修改matplotlib的配置。搜索matplotlibrc显示我有两个:
查看site-packages文件夹,我发现很多包的名称中有波浪号:
~klearn是sklearn,但还有另一个sklearn。~atplotlib 也是 matplotlib,更改日期是 2018-11~-tplotlib的更改日期是 2019-3.15matplotlib的更改日期是2019-3.28(我最近确实更新了 matplotlib)这些波浪号名称包的用途是什么?我可以安全地删除它们吗?
您是否有可能使用 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"
...
Run Code Online (Sandbox Code Playgroud)
如果这就是这些文件,那么您可以安全地删除它们。
| 归档时间: |
|
| 查看次数: |
1089 次 |
| 最近记录: |