如何从命令行运行 python whl 端点

问题描述 投票:0回答:0

如何运行打包的 python .whl 文件的主要功能(或任何端点)。 例如,我创建了包:

entry_points={'group_1': ['run=__main__:main']},

并且有一个文件

\__main__.py
具有功能
main()
.

我试着运行命令

> python mypack.whl
我期待它运行主模块。 但是我得到一个错误:
can't find '__main__' module in whl

python setuptools python-packaging python-wheel
© www.soinside.com 2019 - 2024. All rights reserved.