Python IDLE is not starting on Windows 7

前端 未结 10 1688
南旧
南旧 2021-02-09 04:31

I used to use Python 2.7 and then IDLE was working. I uninstalled it and installed Python 3.1.
Right now Idle cannot launch. What should i do to get it running?

NOTE

10条回答
  •  眼角桃花
    2021-02-09 05:08

    My system is Win7/64 Enterprise edition and the Python version is 2.7.3 (I need this one...). This is what I got when I ran idle.py from the command window:

    "
    C:\Python27\Lib\idlelib>idle.py
    Traceback (most recent call last):
      File "C:\Python27\Lib\idlelib\idle.py", line 11, in 
        idlelib.PyShell.main()
      File "C:\Python27\Lib\idlelib\PyShell.py", line 1406, in main
        root = Tk(className="Idle")
      File "C:\Python27\lib\lib-tk\Tkinter.py", line 1685, 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:\Program Files (x86)\CSR\BlueSuite 2.5.0} C:/Python27/lib/tcl8.5 C:/lib/t
    cl8.5 C:/lib/tcl8.5 C:/library C:/library C:/tcl8.5.2/library C:/tcl8.5.2/librar
    y
    
    This probably means that Tcl wasn't installed properly.
    "
    

    Indeed there was no "tcl8.5" folder in any of the listed above place but it was under: "C:\Python27\tcl".

    When I copied it under "C:\Python27\lib" then IDLE started (with some other warnings but this seems related to my corp environment...)

    In conclusion this looks like either an installer failing to copy the folder where it is supposed to or failing to set up some environment variables correctly or there's an actual bug int the release likely to show up on Win7/64 on certain edition(s). I am not a Python expert enough to debug Python itself, so please somebody take it from here...in the meantime I will see if the "workaround" is good enough :-)

提交回复
热议问题