Python 3.0.1 可执行文件创建器

发布于 2024-07-15 22:10:24 字数 356 浏览 4 评论 0原文

有谁知道现在是否有支持Python 3.0.1的Windows Python可执行文件创建程序? 似乎 py2exe 和 pyInstaller 以及我发现的所有其他文件仍然无法支持 3.0 或 3.0.1。

任何帮助是极大的赞赏。

编辑:我想我可以将程序降级到旧版本的Python,以使其与 py2exe 一起使用。 最困难的部分可能是使用旧版本的 Tkinter。

有没有人有幸使用 py2exe 或 pyInstaller (或其他 Windows 友好的程序)来创建使用 Tkinter 以及子进程的可执行文件。

我实际上不确定如何获取我的程序将安装到的目录,以便子进程可以找到我正在使用的可执行程序。

Does anyone know if there's a windows Python executable creator program available now that supports Python 3.0.1? It seems that py2exe and pyInstaller, along with all the rest I've found, still aren't anywhere close to supporting 3.0 or 3.0.1.

Any help is greatly appreciated.

Edit: I guess I could downgrade the program to an older version of Python to make it work with py2exe. The hardest part will probably be using an older version of Tkinter.

Has anyone had luck with using py2exe or pyInstaller (or another windows-friendly program) to create an executable that uses Tkinter as well as subprocess.

I'm actually not sure how to get the directory my program will be installed into so subprocess can find the executable program I'm using.

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

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

发布评论

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

评论(5

つ可否回来 2024-07-22 22:10:24

cx_Freeze 怎么样。 好像支持python 3.0和3.1?

How about cx_Freeze. Seems to support python 3.0 and 3.1?

纸短情长 2024-07-22 22:10:24


py2exe 不支持 Python 3。 要评论的相关错误在这里:
https://sourceforge.net/p/py2exe/feature-requests/20/

Python3 的 py2exe 已经发布了!

这是原始错误报告:
http://sourceforge.net/projects/py2exe/

以下是提及该版本的评论:
http://sourceforge.net/projects/py2exe/

这是 pypi 上的包:
https://pypi.python.org/pypi/py2exe/0.9.2.0

请注意,Python 3 的 py2exe 仅支持 Python 3.3 及更高版本!

非常感谢 py2exe 开发团队!


Python 3 is not supported by py2exe. The relevant bug to comment on is here:
https://sourceforge.net/p/py2exe/feature-requests/20/

py2exe for Python3 is out!

Here is the original bug report:
http://sourceforge.net/projects/py2exe/

Here is the comment mentioning the release:
http://sourceforge.net/projects/py2exe/

Here is the package on pypi:
https://pypi.python.org/pypi/py2exe/0.9.2.0

Note that py2exe for Python 3 only supports Python 3.3 and above!

A huge thank you to the py2exe development team!

长伴 2024-07-22 22:10:24

没有回答原来的问题,而是:

我实际上不确定如何获取我的程序将安装到的目录,以便子进程可以找到我正在使用的可执行程序。

你可以使用类似的东西

if hasattr(sys, 'frozen'): # this means we're installed using py2exe/pyinstaller
    INSTDIR = os.path.dirname(sys.executable)
else:
    ...

Not answering the original question but this:

I'm actually not sure how to get the directory my program will be installed into so subprocess can find the executable program I'm using.

You can use something like

if hasattr(sys, 'frozen'): # this means we're installed using py2exe/pyinstaller
    INSTDIR = os.path.dirname(sys.executable)
else:
    ...
吃素的狼 2024-07-22 22:10:24

经过很多天的搜索,我得出的结论是,目前没有任何方法可以为 python 3.0 脚本制作可执行文件。

我想出的一种解决方法是使用便携式 python:
http://www.portablepython.com/releases/

至少允许单独安装可以与您的脚本一起分发以帮助用户。

After searching for many days I came to the conclusion that the isn't currently any method for making executables for python 3.0 scripts.

One workaround I came up with was to use portable python:
http://www.portablepython.com/releases/

Which at least allows a separate install which you could distribute with your scripts to help users.

淡淡绿茶香 2024-07-22 22:10:24

我让它与 cx_freeze 一起使用。

有点麻烦,因为您必须添加一行代码来解决一些错误,但事实证明它与 Python 3.1.1 和 PyQt4 配合得很好。

另请参阅此处检查额外的代码行等。

I got it working with cx_freeze.

Was a bit of a hassle since you have to add a line of code to get around some errors but it turned out to go just fine with Python 3.1.1 and PyQt4.

Also see here to check on that extra line of code etc.

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