Python 3.0.1可执行创建者 [英] Python 3.0.1 Executable Creator

查看:99
本文介绍了Python 3.0.1可执行创建者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道现在是否有支持Python 3.0.1的Windows Python可执行文件创建程序吗?看来py2exe和pyInstaller以及我发现的所有其他工具仍远未达到支持3.0或3.0.1的水平.

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.

非常感谢您的帮助.

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

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.

有人通过使用py2exe或pyInstaller(或其他Windows友好程序)来创建使用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.

推荐答案

但不回答原始问题:

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

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.

您可以使用类似的

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

这篇关于Python 3.0.1可执行创建者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆