我想使用Pyinstaller将我的脚本编译为Linux中的二进制可执行文件,但问题是使用python 2.x而不是python 3.x编译Pyinstaller。 (构建进程成功,但我的脚本仅适用于python 2.x.)。 记录:
$ pyinstaller script.py
22 INFO:PyInstaller:3.1.1
22 INFO:Python: 2.7.6
22 INFO:平台:Linux-4.2.0-34-generic-x86_64-with-Ubuntu-14.04
...
如何配置Pyinstaller以使用Python 3.x编译我的脚本。
我已经解决了我的问题,使用pip3安装Pyinstaller:
sudo pip3 install pyinstaller
感谢您的帮助!
答案 0 :(得分:4)
要为不同版本安装带有pip的软件包,可以使用pip3 / pip2 / pip2.7 / pip3.5 etc.
,所以在你的情况下为python 3获取pyinstaller
只需使用:
pip3 install pyinstaller