gpt4 book ai didi

python - 摆脱 easy_install 消息 : : module references __file__

转载 作者:太空狗 更新时间:2023-10-30 00:46:30 25 4
gpt4 key购买 nike

模块名称:模块引用__file__

当我使用 easy_install 安装我自己的包时,这出现了好几次,但最初的谷歌搜索没有带来任何成功。

我完全知道我在模块中使用了 __file__,但它没有任何问题。

如何在不删除 __file__ 引用的情况下删除此消息?

最佳答案

在谷歌搜索同样的问题时发现了这个页面。解决方案是:

像这样告诉 distutils 你的包不是 zip_safe(这没关系):

setup (name = 'yourmodule',
...
zip_safe = False,
...
)

这样 easy_install 将不必解析您的模块,也不会提示 __file__ 引用。

关于python - 摆脱 easy_install 消息 : : module references __file__,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8362510/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com