Python Tkinter throwing Tcl error

前端 未结 8 1653
孤城傲影
孤城傲影 2021-02-20 13:23

I am learning basic GUI in Python, and I came across a sample example to read file name from file explorer on Stack Overflow.

from Tkinter import Tk
from tkFileD         


        
8条回答
  •  闹比i
    闹比i (楼主)
    2021-02-20 14:15

    IDLE is probably setting the path required for TCL. To find out what path is being used by IDLE, compare the output of sys.path from IDLE and without IDLE. Then you can add the location of init.tcl either using an environment variable or programatically. See Xenomorph suggestion.

提交回复
热议问题