轻量事件管理器
准备如下圈红几个文件,并
2、开发完成后运行
测试是否有bug报错
没问题就可以打包成exe,终端下执行
1. 确认 PyInstaller 已安装
pip show pyinstaller
如果未安装,请先安装:
pip install pyinstaller
2. 检查 Python 环境变量
# 查看 Python 是否在 PATH 中
where python
where pip
where pyinstaller
##########################3
ModuleNotFoundError: No module named 'PIL' During handling of the above exception, another exception occurred:
这个错误表明 PyInstaller 在处理图标文件时需要 Pillow
库(Python Imaging Library 的现代分支),但系统中没有安装。以下是完整的解决方案:
解决方法
1. 安装 Pillow 库
pip install pillow
2. 重新尝试打包
python -m PyInstaller build.spec
#######################################
\EventManager> python -m PyInstaller build.spec
打开验证,是否正常运行
如换电脑运行报错
将此路径修改后重新打包