1

I have a fairly new install of Anaconda with Python 3.3, and am using Pydev.

When I try to use tkinter with

from tkinter import Tk

master = Tk() # create a Tk root widget, which is a window

I get the following message

_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    C:/Anaconda/envs/p33/lib/tcl8.5 C:/Anaconda/envs/lib/tcl8.5 C:/Anaconda/lib/tcl8.5 C:/Anaconda/envs/library C:/Anaconda/library C:/Anaconda/tcl8.5.11/library C:/tcl8.5.11/library

This page (http://mail.python.org/pipermail/python-list/2011-March/599573.html) suggests that I need to change the TCL_LIBRARY environment variable. But I do not know how to do that.

How can I make tkinter work with my build?

4

1 回答 1

1

这不是一个合适的解决方案,但我通过复制文件夹让它工作

C:\Anaconda\envs\p33\tcl\tcl8.5
C:\Anaconda\envs\p33\tcl

C:\Anaconda\envs\p33\Lib
于 2013-08-08T07:50:47.530 回答