PyInstaller 没有检测到二级导入这一事实。tkcalendar 的HowTos文档中解释了解决此问题的方法:

 

使用 PyInstaller 捆绑应用程序时, 检测 tkcalendar 的 babel 依赖存在问题。这可以通过使用以下--hidden-import选项来解决:

$ pyinstaller --hidden-import babel.numbers myscript.py

或通过编辑.spec文件:

hiddenimports=["babel.numbers"]
posted on 2022-08-06 07:03  4度水  阅读(474)  评论(0)    收藏  举报