报错原文:
Traceback (most recent call last):
File "site-packages/PyInstaller/loader/rthooks/pyi_rth__tkinter.py", line 30, in <module>
FileNotFoundError: Tcl data directory "/Users/dkaplan/PycharmProjects/chris_csv_converter/src/dist/csv_converter/tcl" not found.
[36637] Failed to execute script pyi_rth__tkinter
解决方法:
打包时,加入 --exclude-module=tkinter
pyinstaller --onefile --exclude-module=tkinter csv_converter.py
还没深入探索,先记下来。
参考:
PyInstaller: FileNotFoundError when trying to run the distribution file - Stack Overflow
本文介绍了一个使用PyInstaller打包包含Tkinter的应用程序时出现的错误,并提供了解决方案。错误信息提示找不到Tcl数据目录。解决方法是在打包命令中排除Tkinter模块。
1246

被折叠的 条评论
为什么被折叠?



