报错原文:
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