python 2.7 脚本打包 exe

pip install pyinstaller

进入 C:/Python27/Scripts 目录  或者 添加 Scripts 的环境变量

pyinstaller -F xxxx.py # xxxxx 代表你要打包的py 脚本全路径

或者

python pyinstaller -F xxxx.py # xxxxx 代表你要打包的py 脚本全路径

 

如果遇到问题:

Traceback (most recent call last): File “”, line 1, in File

“c:\users\root\temp\pip-build-mus7vd\pyinstaller\setup.py”, line 63 file=sys.stderr)

^ SyntaxError: invalid syntax

 

解决方案:

Use this commands:

1
2
python.exe -m pip install pefile==2019.4.18
python.exe -m pip install pyinstaller==3.6

参考这里:

https://zsecurity.org/forums/topic/syntaxerror-invalid-syntax/

 

或者

1
Visit Pyinstaller Release History to view the version you would like to install (all versions from Python v3.6 down to v3.0 support Python 2)
1
pip install pyinstaller==3.5

参考这里 :https://stackoverflow.com/questions/63342345/cant-install-pyinstaller-at-ubuntu

 

posted @   lesten  阅读(540)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
点击右上角即可分享
微信分享提示