python编译为可执行文件

http://nuitka.net
http://www.pyinstaller.org

推荐使用pyinstaller
安装加密模块
pip install PyCrypto
安装加壳工具
yum install upx

找到upx位置
#whereis upx
#upx: /usr/bin/upx /usr/share/man/man1/upx.1.gz
# pyinstaller -F –key !@#$%^&*gew –upx-dir /usr/bin/upx –clean test.py
编译测试,keys为pyc加密使用。

发表评论

电子邮件地址不会被公开。 必填项已用*标注