Quantcast
Channel: ActiveState Community Site - Installation Support for ActivePython
Viewing all articles
Browse latest Browse all 48

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 48

Trending Articles