如何防止 pip 和 easy_install 删除临时目录?

sor*_*rin 7 python pip easy-install

我需要调试一些失败以使用 pip 安装软件包,似乎一旦我收到错误 pip 就会删除所有临时文件,从而阻止我查看内部并找出发生了什么。

下面的要点包含我得到的错误,但我确实想找出哪个配置文件正在生成此错误,并且在脚本结束时删除 tmp 中的所有文件。

https://gist.github.com/ssbarnea/b373062dd45de92735c7482b2735c5fb

Pet*_*sta 5

From my experience with pip 19.0.3, it is sufficient to use the --no-clean option, which is available to both pip install and pip wheel.

It can also be specified in the respective sections of the pip configuration file:

[install]
no-clean = true

[wheel]
no-clean = true
Run Code Online (Sandbox Code Playgroud)