我正在用auto_py_to_exe创建一个GUI应用程序,但是当我通过工具将它转换为EXE文件时,为什么会收到这个错误消息呢?
错误信息。
Traceback (most recent call last):
File "School MS.py", line 182, in <module>
File "tkcalendar\dateentry.py", line 128, in __init__
File "tkcalendar\calendar_.py", line 258, in __init__
File "babel\dates.py", line 353, in get_day_names
File "babel\core.py", line 641, in days
File "babel\core.py", line 364, in _data
File "babel\localedata.py", line 141, in load
File "babel\localedata.py", line 147, in load
ModuleNotFoundError: No module named 'babel.numbers'
[13604] Failed to execute script 'School MS' due to unhandled exception!
[process exited with code 1 (0x00000001)]
发布于 2022-07-12 09:22:09
这类似于如何通过pyinstaller安装带有to日历模块的python应用程序?中的问题
实际上,在查看了自动py-to-exe之后,我意识到这只是一个围绕PyInstaller的GUI。因此,解决方案是相同的,您需要在GUI的高级部分将babel.numbers
传递给--hidden-import
选项。
https://stackoverflow.com/questions/72371156
复制相似问题