Known Issue Workaround: Python 3.4.1 Windows 64-bit IDLE (Python GUI) to fail to run

Posted by fmaes on 2014-11-21 12:26

Symptoms: IDLE (Python GUI) fails to start from START Menu

PROBLEM:
Run IDLE (Python GUI) from START menu and get Window flash but nothing else. IDLE fails to start in a ActiveState Python 3.4.1 installation.

However, the Python Interactive shell runs properly from the START menu.

BACKGROUND:

This is a Windows 7 64-bit installation.

I installed ActivePython-3.4.1.0-win64-x64.msi (community edition) that was downloaded directly from the web site.

Ultimately, I installed from an Administrator privileged command line window using the msiexec /i command.

I did have to change the default installation options to make the new 3.4 installation the default python on the system.

SPECIFIC SYMPTOMS:

Manually, I attempted to run idle.py and saw the following:

     C:\Python34\Lib\idlelib>idle.py
    "Traceback (most recent call last):
      File "C:\Python34\Lib\idlelib\idle.py", line 11, in 
        idlelib.PyShell.main()
      File "C:\Python34\Lib\idlelib\PyShell.py", line 1533, in main
        root = Tk(className="Idle")
      File "C:\Python34\Lib\tkinter\__init__.py", line 1805, 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:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library C:/
    tcl8.6.1/library C:/tcl8.6.1/library

    This probably means that Tcl wasn't installed properly."

THE SOLUTION:

Step 1) Manually Copy c:\Python34\tcl\tcl8.6 c:\python34\Lib

This should put the tcl8.6 sub-directory in the defined search path (last line above).

Repeat same experiment, manually running idle.py:

    C:\Python34\Lib\idlelib>idle.py
   "Traceback (most recent call last):
      File "C:\Python34\Lib\idlelib\idle.py", line 11, in 
        idlelib.PyShell.main()
      File "C:\Python34\Lib\idlelib\PyShell.py", line 1533, in main
        root = Tk(className="Idle")
      File "C:\Python34\Lib\tkinter\__init__.py", line 1805, in __init__
        self.tk = _tkinter.create(screenName, baseName, className, interactive, want
    objects, useTk, sync, use)
    _tkinter.TclError: Can't find a usable tk.tcl in the following directories:
        C:/Python34/lib/tcl8.6/tk8.6 C:/Python34/lib/tk8.6 C:/lib/tk8.6 C:/library


    This probably means that tk wasn't installed properly."

Step 2) Manually Copy c:\Python34\tcl\tk8.6 c:\python34\Lib

(why it wasn't found in the supposedly searched path
"C:/Python34/lib/tcl8.6/tk8.6"
I have no idea)

Problem solved: IDLE (Python GUI) will now run from the Start Menu

I don't know exactly why TCL & Tk were not installed properly in the first place. The installation logs (-L*v option of the msiexec command) didn't show anything obvious. The environment variable TCL_LIBRARY may allow another solution, but since there was no TCL_* environment variables defined in my system installation, this seemed a simple fix.

i-shenl
ActiveState Staff
Thu, 2016-06-30 13:31

The TCL_LIBRARY environment variable can be used to. It just needs to point to the tcl/tcl8.x that is in the PythonXX folder.

cuda | Tue, 2017-08-22 14:28

This problem is similar to the post on 2014-11-21. Executed a repair on the downloaded S/W 3.6 (3600). No change. Please advise what file might be missing.

grahams
ActiveState Staff
Wed, 2017-08-23 09:33

IDLE will work, but there isn't a binary on PATH, a script that can be found from the command line, or shortcut to start it.

This is the current work-around:

Navigate to \Python36\Lib\idlelib
Run idle.bat

-Or- (Windows 10)

Navigate to \Python36\Lib\idlelib
Right click idle.bat and select "Create Shortcut"
Navigate to \Users\$yourID\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Create a new folder. Possibly ActivePythonIDLE
Move the shortcut you created into this folder to give you a Start Menu item for IDLE