【发布时间】:2017-06-30 01:08:37
【问题描述】:
我有一个使用 Tkinter 的基本 Python 脚本。
from Tkinter import Tk
from tkFileDialog import askdirectory
Tk().withdraw()
print askdirectory()
使用 PyInstaller 编译我的脚本后,我尝试在没有安装 Python 的 Windows 7(64 位)计算机上运行我的程序。
它引发了这个错误:
Can't find a usable init.tcl in the following directories: [list of directories]
This probably means that Tcl wasn't installed properly
为什么我的脚本用 PyInstaller 编译后找不到init.tcl?
【问题讨论】:
-
我在将程序复制到 Windows 7 x64 时遇到了类似的问题,完全被它弄糊涂了。复制到 Win 8 和 10 计算机可以正常工作。
标签: python-2.7 tkinter windows-7 pyinstaller