项目场景:
使用python的tkinter库报错_tkinter.TclError: Can’t find a usable tk.tcl in the following directories:
问题描述
_tkinter.TclError: Can’t find a usable tk.tcl in the following directories报错如何解决:
原因分析:
解释器从python的安装目录下的/lib/tcl8.6/tk8.6查找tk.tcl
解决方案:
从python安装目录下的/tcl目录下复制tcl8.6文件夹到python的安装目录下的lib目录,从python安装目录下的/tcl目录下复制tk8.6文件夹到python的安装目录下的lib/tcl8.67目录下:例如:python安装路径\Lib\tcl8.6