0

After installing ActivePython 2.7.10.12, when trying to create a Tkinter instance, I get the following error:

ActivePython 2.7.10.12 (ActiveState Software Inc.) based on
Python 2.7.10 (default, Aug 21 2015, 12:07:58) [MSC v.1500 64 bit (AMD64)] on wi
n32
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import Tk
>>> root = Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 1814, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, want
objects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    C:/Python27/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library C:/
tcl8.5.18/library C:/tcl8.5.18/library



This probably means that Tcl wasn't installed properly.
twasbrillig
  • 17,084
  • 9
  • 43
  • 67

1 Answers1

0

Here is a workaround that worked for me. I copied 2 directories: tcl8.5 and tk8.5, from C:\Python27\tcl to C:\Python27\lib, and then the code ran without any error.

twasbrillig
  • 17,084
  • 9
  • 43
  • 67
  • 1
    Does MS Windows support symlinks? When tcl/tk is updated, it will be updated in C:\Python27\tcl so your programs will still be using the old (copied) version (may or may not cause a problem). –  May 05 '16 at 01:10