我试图通过Pyinstaller将一个使用标准python库和tkintergui构建的简单applet打包分发。PyInstaller编译(正确的术语?)很好,但是当我打开exe时,我得到了以下信息:
Traceback (most recent call last):
File "site-packages/PyInstaller/loader/rthooks/pyi_rth__tkinter.py", line 28, in <module>
FileNotFoundError: Tcl data directory "/var/folders/sj/r0yyz8393ld2xrd_wf65bwxr0000gn/T/_MEIDeFnFy/tcl" not found.
[67821] Failed to execute script pyi_rth__tkinter
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
我试着调整我的编译设置,比如添加--hidden-import tkinter
,但是没有用。在
脚本如下:
^{pr2}$
这似乎是在OSX上使用
onefile
的已知问题从python脚本所在的目录中尝试此操作
这个解决方案是在公开发行的here中提出的
相关问题 更多 >
编程相关推荐