cx_freeze:在以下目录中找不到可用的init.tcl
据我所知,cx_freeze
是唯一能够将 Python 脚本生成为 .exe
文件的应用程序。但是,我想在 Python 3 中制作一个 GUI exe
。在冻结一个简单的 Tkinter GUI 并运行该 exe 后,我收到以下错误:
> _tkinter.TclError: Can't find a usable init.tcl in the following directories:
> {C:\Users\User\Desktop\tkinter\build\exe.win32-3.1\tcl}
> C:/Users/User/Desktop/tkinter/build/exe.win32-3.1/tcl8.5
> C:/Users/User/Desktop/tkinter/build/lib/tcl8.5
> C:/Users/User/Desktop/tkinter/build/lib/tcl8.5
> C:/Users/User/Desktop/tkinter/lib/tcl8.5
> C:/Users/User/Desktop/tkinter/build/library
> C:/Users/User/Desktop/tk inter/library
> C:/Users/User/Desktop/tkinter/tcl8.5.2/library
> C:/Users/User/Desktop/tcl8.5.2/library
> This probably means that Tcl wasn't installed properly.
我正在使用简单设置 cx_freeze 选项。
我的 cx_freeze exe 捆绑包保存到以下目录:
C:\Users\User\Desktop\tkinter\build\exe.win32-3.1
文件是:
_ctypes.pyd
_tkinter.pyd
basicLABEL.exe
library.zip
python31.dll
tcl85.dll
tk85.dll
unicodedata.pyd
As far as I'm aware, cx_freeze
is the only app able to make Python scripts to .exe
files. However, I would like to make a GUI exe
in Python 3. And after freezing a simple Tkinter GUI and running the exe, I get the following error:
> _tkinter.TclError: Can't find a usable init.tcl in the following directories:
> {C:\Users\User\Desktop\tkinter\build\exe.win32-3.1\tcl}
> C:/Users/User/Desktop/tkinter/build/exe.win32-3.1/tcl8.5
> C:/Users/User/Desktop/tkinter/build/lib/tcl8.5
> C:/Users/User/Desktop/tkinter/build/lib/tcl8.5
> C:/Users/User/Desktop/tkinter/lib/tcl8.5
> C:/Users/User/Desktop/tkinter/build/library
> C:/Users/User/Desktop/tk inter/library
> C:/Users/User/Desktop/tkinter/tcl8.5.2/library
> C:/Users/User/Desktop/tcl8.5.2/library
> This probably means that Tcl wasn't installed properly.
I am using the simple setup cx_freeze option.
My cx_freeze exe bundle is save to the following directory:
C:\Users\User\Desktop\tkinter\build\exe.win32-3.1
Files are:
_ctypes.pyd
_tkinter.pyd
basicLABEL.exe
library.zip
python31.dll
tcl85.dll
tk85.dll
unicodedata.pyd
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚通过将位于 Python 3 安装目录中的
tcl8.5
和tk8.5
目录复制到.exe 应用程序运行的文件夹。
I have just solved the problem myself by copying the
tcl8.5
andtk8.5
directories, located in the Python 3 installation directory, into the.exe
folder the app works.