Pyinstaller Python文件+仅在一个exe中

发布于 2025-01-24 05:03:11 字数 365 浏览 3 评论 0原文

我正在执行在C ++中创建的.exe文件的PY文件(在“数据”文件夹中)

Python代码: os.system(“ data \\ time.exe”)

当我将pyinstaller与-onefile属性一起使用时,我找不到程序来编译.py file + the .py file + the the .py + the the。数据“内部另一个.exe。

有人知道如何将我的整个程序转换为一个.exe吗?在其中我可以运行我的Python程序以及内部C ++的.exe?

(我试图使用.spec和-add-data属性测试,但是我找不到与我想做的事情兼容的方法)

我期待您的回复,

非常感谢您; 3

py file in which I am executing a .exe file created in C++ (is inside a "data" folder)

Python Code:
os.system("data\\time.exe")

When I use the pyinstaller with the --onefile attribute I can't find a way for my program to compile the .py file + the "data" with another .exe inside.

Does anyone know how to convert my entire program into a single .exe? in which I can run my python program and also my .exe from C++ inside?

(I have tried to test with the .spec and with the --add-data attribute but I can't find a way that is compatible with what I want to do)

I look forward to your response,

Thanks you very much <3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

呆头 2025-01-31 05:03:11

有一个名为 auto-py-to-exe 的程序,该程序可从程序中创建一个exe,而无需您创建设置文件。该接口很棒,可让您轻松创建和exe而不创建 setup.py 。这也使您可以将应用程序作为单个EXE打包,而无需任何其他文件。以下是一个屏幕示射:

“

您可以通过输入命令行来安装程序:

python -m pip install auto-py-to-exe

您可以通过输入来运行它:

auto-py-to-exe

要查看有关 auto-py-py-to-exe 的更多信息,请请访问 pypi 页面, https://pypy.org.org.org.org.org /project/auto-py-to-exe/

There is a program called auto-py-to-exe which creates an exe out of your program without requiring you to create a setup file. The interface is great and allows you to easily create and exe without creating a setup.py. This also allows you to package your app as a single exe, without any other files. Below is a screenshot:

screenshot

You can install the program by typing into the command line:

python -m pip install auto-py-to-exe

You can run it by typing in:

auto-py-to-exe

To see more about auto-py-to-exe, please visit the PyPI page at https://pypi.org/project/auto-py-to-exe/.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文