将多个python文件捆绑到exe

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

我有2个Python文件,一个是runner.py,另一个是Integration10.py,还有一些其他Excel文件用于存储中间数据。 runner.py文件运行无限循环,并在循环内每秒调用一次[[Integration10.py文件。

runner.py

的代码如下:... while True: try: os.system("python IntegrationV10.py") time.sleep(1) except KeyboardInterrupt: break
我想将

runner.py,Integration10.py

和所有Excel文件捆绑到一个简单的exe文件中。为此,我运行以下命令:pyi-makespec runner.py IntegrationV10.py pyinstaller runner.spec
但显示以下错误:

没有名为IntegrationV10.py的文件

请帮助我。

python exe pyinstaller
1个回答
0
投票
请参见the documentation for pyi-makespec。您需要给它一个已经存在的文件的名称。换句话说,pyi-makespec runner.py IntegrationV10.py失败是因为“ IntegrationV10.py”不存在(或找不到)。

在您的帖子中,您在“ Integration10.py”和“ IntegrationV10.py”之间切换。如果将pyi-makespec runner.py IntegrationV10.py替换为pyi-makespec runner.py Integration10.py,该命令是否起作用?

© www.soinside.com 2019 - 2024. All rights reserved.