“easy_install"期间发出的警告 [英] warnings emitted during 'easy_install'
问题描述
当我easy_install
一些python模块时,警告如:
When I easy_install
some python modules, warnings such as:
<some module>: module references __file__
<some module>: module references __path__
<some module>: module MAY be using inspect.trace
<some module>: module MAY be using inspect.getsourcefile
有时会被发射.
这些消息来自哪里(什么包/源文件)?为什么引用 __file__
或 __path__
被认为是一件坏事?
Where (what package / source file) do these messages come from? Why is referencing __file__
or __path__
considered a bad thing?
推荐答案
easy_install
不喜欢使用 __file__
和 __path__
不是这样很大程度上是因为它们很危险,但因为使用它们的包裹几乎总是无法用完压缩鸡蛋.
easy_install
doesn't like use of __file__
and __path__
not so much because they're dangerous, but because packages that use them almost always fail to run out of zipped eggs.
easy_install
是警告,因为它将效率较低"安装到解压缩目录而不是压缩鸡蛋中.
easy_install
is warning because it'll install "less efficiently" into an unzipped directory instead of a zipped egg.
实际上,当 zip_safe 检查失败时,我通常会很高兴,因为如果我需要深入了解模块的源代码,那就容易多了.
In practice, I'm usually glad when the zip_safe check fails, because then if I need to dive into the source of a module it's a ton easier.
这篇关于“easy_install"期间发出的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!