打包Python代码可以使用pyinstaller
安装pyinstaller
python安装目录下shift+右键打开cmd 或者Powershell窗口输入
pip install pyinstaller
python安装目录下\Scripts文件夹下会出现 pyinstaller.exe
添加环境变量
在系统变量PATH中再加入"python安装地址\Scripts",否则cmd中会提示
‘pyinstaller’ 不是内部或外部命令
打包
在*.py文件目录下shift+右键打开cmd 或者Powershell窗口输入
pyinstaller -F test.py
文件夹下会生成一堆文件,在dist文件夹下会生成想要的exe文件
更多技术请关注。
Copyright © 2019- hids.cn 版权所有 赣ICP备2024042780号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务