Python IDLE won´t start
Asked Answered
T

5

2

I´m a noob in python and about a week ago IDLE stop working, I have readed some other people questions about this, but none of them had the same error that I´m getting, which is:

Traceback (most recent call last):
    File "c:\python26\Lib\idlelib\idle.py", line 21, in <module>
        idlelib.Pyshell.main()
    File "C:\python26\Lib\idlelib\PyShll.py", line 1386, in main
        root = Tk(className="Idle")
    File "C:\python26\Lib\lib-tk\Tkinter.py", line 1643, in __init__
        self.tk = _tkinter.creat(screenName, baseName, className, interactive, want
objects, useTk, sync, use)
_tkinter.TclError: Can´t find a usable init.tcl in the following directories:
        C:/Python26/lib/tcl8.5 c:/lib/tcl8.5 c:/lib/tcl8.5 c:/library c:/library c:/
tcl8.5.2/library c:/tcl8.5.2/library
This probably means that Tcl wasn´t installed properly.

So I have reinstall python about 3 to 4 times and I keep getting the same error.

I´ll will for ever be in debt to anyone that gives me a solution to this error.

By the way, I´m running Python 2.6.6 on Win 7 32-Bit.

Thank you.

Tomato answered 22/9, 2011 at 4:30 Comment(2)
Have you tried checking your PATH variables as suggested here: bugs.python.org/issue3881 ? (also suggested here gossamer-threads.com/lists/python/python/886335 and about a thousand other places on Google)Scansion
it wont be in your program files, try searching idle in ur start menu.Callender
S
6

This TCL issue has appeared in a number of Python forums and is generally prevents the IDLE GUI from starting e.g. http://www.gossamer-threads.com/lists/python/python/902912 and is related to the TCL_LIBRARY enviroment variables. Try and edit the enviroment variables

Right click on (My) Computer, go to properties, Advanced Tab, press Environment Variables and edit TCL_LIBRARY to indicate the Python path e.g C:\Python26\tcl\tcl8.5 (or enter the path that represents your version. Idle should start then.

I noticed that this is an issue when you install other programs that may depend on the TCL Library. Happened to me after I installed SciLab. Therefore changing the variable may cause issues with another installed app. Hope this helps.

Strake answered 21/12, 2012 at 12:27 Comment(2)
This happened to me because of OMNET++, OMENET++ 3 installer created system variable TCL_LIBRARY pointing C:\OMNeT++\lib\tcl8.4. Just delete the system variable everything would be fine.Penley
You are life saver.Works like charm !!Blowup
C
2

Some folders may have been deleted or removed.

Go to Uninstall Program

Choose Python

Click "Change"

Then click "repair"

Allow the computer to repair....Should work after this.

Some notes*

Always make sure everything is in the same directory that you are working in CMD. I opened up my directory from the cmd and put my files in the same directory.

Check your 'App data' folder too for any Python files.

Be aware that 'App data' folder may be hidden.

Also when you reinstall click customize and python will allow you to make your own customize path location which is helpful and a lot more simple then what python chooses.

Cleome answered 15/4, 2018 at 9:33 Comment(0)
T
1

This could be caused by using the wrong version of Python.
32-bit and 64-bit work differently.

Tucker answered 21/10, 2022 at 13:32 Comment(0)
S
0

(Assuming your Python install is not corrupt. Did you make any changes to the Python install, try and install anything else?)

What is your Python install directory? Look under Python_install_directory/tcl , init.tcl should be there, is it? Tell us what you find.

Saltarello answered 22/9, 2011 at 4:52 Comment(0)
K
0

Hey idk why this worked for me but I just right clicked on the the idle icon and clicked "Duplicate". This created another icon "IDLE duplicate", weirdly, and when I try to open this version it works. Hope this helps!

Kin answered 27/9, 2015 at 2:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.