nuikta 打包 exe 运行出现的 comtypes ImportError: Typelib different than module 问题

119 天前
 tyy123

我用 nuikta 打包成 exe 工具,因为要用到 comtypes 的原因,加上了--include-package=comtypes --include-package=comtypes.client --include-package=comtypes.gen ,打包成的 exe 工具在本地运行可以,但是在一个全新机器上就会出现 omtypes\gen_944DE083_8FB8_45CF_BCB7_C477ACB2F897_0_1_0.py", line 9204, in <module> \comtypes_tlib_version_checker.py", line 18, in _check_version ImportError: Typelib different than module ,然后我在代码里指定了 comtypes.gen_dir = COMTYPES_GEN_DIR ,还是不行,有没有大佬遇到过这种情况,求指教

1353 次点击
所在节点    Python
2 条回复
ciderzero
109 天前
换一个 comtypes 版本试试
tyy123
105 天前
确实换了低版本得 python 和 comtypes 就可以了。。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://ex.noerr.eu.org/t/1133253

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX