python打包代码为exe

python打包代码为exe

1.先安装pyinstaller,直接pip install pyinstaller就好了

2.cd到py文件位置,输入以下命令:

-C:\Users\lenovo\PycharmProjects\pythonProject12>pyinstaller -F --hidden-import easygui -i C:\Users\lenovo\PycharmProjects\pythonProject12\yang_2.ico C:\Users\lenovo\PycharmProjects\pythonProject12\auto_water2.py

posted @ 2022-09-21 16:46  小杨的冥想课  阅读(73)  评论(0编辑  收藏  举报