Python 3.0.1 Executable Creator

笑着哭i 提交于 2019-11-30 09:59:57

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:
    ...

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

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!

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.

WrongAboutMostThings

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!