TKinter and TCL

Hi,

I'm new to Python and Pycharm.  I've also searched google on this issue without much success.

I'm trying to do some examples that require Tkinter.  When I initially tried to run the program it said that TCL wasn't installed properly.  So, I downloaded it and installed it.  Then I get the following when running the program:

C:\Users\mmccoid\Pyth27\Scripts\python.exe C:/Python27/Lib/lib-tk/Tkinter.py
Traceback (most recent call last):
  File "C:/Python27/Lib/lib-tk/Tkinter.py", line 3733, in <module>
    _test()
  File "C:/Python27/Lib/lib-tk/Tkinter.py", line 3708, in _test
    root = Tk()
  File "C:/Python27/Lib/lib-tk/Tkinter.py", line 1685, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    C:/Python27/lib/tcl8.5 C:/Users/mmccoid/Pyth27/lib/tcl8.5 C:/Users/mmccoid/lib/tcl8.5 C:/Users/mmccoid/Pyth27/library C:/Users/mmccoid/library C:/Users/mmccoid/tcl8.5.2/library C:/Users/tcl8.5.2/library

C:/Users/mmccoid/Pyth27/lib/tcl8.5/init.tcl: version conflict for package "Tcl": have 8.5.2, need exactly 8.5.13
version conflict for package "Tcl": have 8.5.2, need exactly 8.5.13
    while executing
"package require -exact Tcl 8.5.13"
    (file "C:/Users/mmccoid/Pyth27/lib/tcl8.5/init.tcl" line 18)
    invoked from within
"source C:/Users/mmccoid/Pyth27/lib/tcl8.5/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"


This probably means that Tcl wasn't installed properly.


I'm sure it is something stupid that I'm doing (or not doing), but I can't figure it out.

Any help would be appreciated.

Thanks,
2 comments
Comment actions Permalink

I had the same issue with a fresh install of Python 2.7 in a VENV. Works fine using the native environment however

0
Comment actions Permalink

Here's a good indication of what's wrong

C:/Users/mmccoid/Pyth27/lib/tcl8.5/init.tcl: version conflict for package "Tcl": have 8.5.2, need exactly 8.5.13
version conflict for package "Tcl": have 8.5.2, need exactly 8.5.13

 Try installing version 8.5.13.

0

Please sign in to leave a comment.