Python Tkinter throwing Tcl error

前端 未结 8 1661
孤城傲影
孤城傲影 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条回答
  •  独厮守ぢ
    2021-02-20 14:15

    In case you are using Virtualenv on Windows I found a solution here: https://github.com/pypa/virtualenv/issues/93

    I copied the "tcl" folder from C:\Python27\ over to the root of the new Virtualenv, Tkinter.Tk() shows a new window without throwing an exception.

    I am running Python 2.7 on Windows 7.

提交回复
热议问题