Python:PyQt4 Py2exe
问候!
因此,我制作了一个 Python 应用程序,它使用非常出色的 PyQt 作为其界面。现在,如果我为 Py2Exe 指定 --bundle 0 选项,生成的编译可执行文件可以正常工作!但由于包含了所有需要的文件,该文件夹变得混乱。所以我尝试为 --bundle 选项传递 1 和 2。一种将所有内容打包到文件 file 中,另一种则打包除 Python dll 之外的所有内容。然而,这两个选项都会导致可执行文件在执行时退出。没有错误被退回。
stackoverflow 上的另一个问题据说为 py2exe 提供“--includes sip”参数,但这并不能解决这个问题。 sip 模块已经包含在应用程序的所有版本中,因此我认为它与 sip 没有任何关系。
我使用 procmon 来监视文件在执行时执行的操作。任何人都可以理解这一点吗? http://www.sendspace.com/file/z67dox
谢谢再见!
Greetings!
So I've made a Python application that uses the ever so great PyQt as it's interface. Now if I was to specify the --bundle 0 option for Py2Exe the resulting compiled executable file works fine! But with all the needed files, the folder gets cluttered up. So I tried passing 1 and 2 for the --bundle option. One packs everything into file file whilst the other packs everything except the Python dll. However both of those options results in the executable file exiting upon execution. No errors are chucked back.
Another question on stackoverflow said to supply the "--includes sip" parameter for py2exe however that does not solve this issue. The sip module was already being included in all builds of the application so I can't think it has anything to do with sip.
I've used procmon to monitor what the file did upon execution. Can anyone make light of this? http://www.sendspace.com/file/z67dox
Thanks bye!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道即使使用原始 win32ui 和 py2exe 也会导致问题。看起来它们可能是相关的,但我对 PyQt 的架构了解不够。
Py2exeAndWin32ui
虽然我意识到这不会给你一个简洁的解决方案,即使它确实有帮助。
I know that even using raw win32ui with py2exe can cause problems. Seems like they could be related, but I don't know enough about the architecture of PyQt.
Py2exeAndWin32ui
Though I realise this wouldn't give you a neat solution even if it did help.