pyInstaller没有为python3安装

时间:2014-10-06 11:53:41

标签: python python-3.x pip pyinstaller pyqt5

在我发布此帖子时,pyInstaller.org网站似乎已关闭。

我试图为python3安装pyInstaller。我试过了两个:

" C:\ python34 \脚本\ easy_install.exe" pyInstaller " C:\ python34 \脚本\ pip.exe"安装pyInstaller

但两者都给出了:

PyInstaller\compat.py", line 129
    if sys.maxint > 2L ** 32:
                     ^
SyntaxError: invalid syntax

python27正常工作pyInstaller与python3不兼容吗?如果没有,我应该如何制作我的pyqt5脚本的独立应用程序?

3 个答案:

答案 0 :(得分:2)

PyInstaller 2.1尚未与Python 3.x兼容。您需要切换到Python 2.x或等到项目与Python 3.x兼容,您可以在PyPI页面上检查它,因为它应该有更新的分类符,将其标记为" Python 3.x"兼容。目前标签是:

Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.4
Programming Language :: Python :: 2.5
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 2 :: Only

答案 1 :(得分:1)

已发布适用于Python 3的experimental branch on GitHub

只需下载或克隆即可运行。

或者,use this fork,修复了一些错误,例如--version-file=...支持和PyQt5多媒体支持和打印服务。

答案 2 :(得分:0)

Pyinstaller与python 3兼容,但应该专门针对该版本安装,简单的方法是这样的(windows / linux):

pip3 install pyinstaller

将其放在CMD(Windows)或终端(Linux)中。请注意pip3。 python的安装目录必须在PATH环境变量中,两个(linux / windows)都可以使用pip。

在PATH变量中获取python库的一种简单方法是在安装程序中选中以下所示的框。

enter image description here