Python IDLE is not starting on Windows 7
Asked Answered
L

10

7

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: I tried c:\Python31\pythonw.exe c:\Python31\Lib\idlelib\idle.py
i uninstalled 3.1 and installed back 2.7, not working neither...

Lushy answered 15/8, 2010 at 16:41 Comment(0)
F
7

In the past, I've often found that when I had some issues with the python.org version of some Python release, specifically on Windows, installing instead the activepython version of the same release, from ActiveState, made the problems go away. So, in your shoes, the first thing I would try would be ActivePython (I don't think they have a 2.7 yet -- it's probably been around for too short a time yet -- but they definitely do have a 3.1).

EDIT: Versions 2.5, 2.6, 2.7, 3.2, 3.3, and 3.4 have been added.

Fennel answered 15/8, 2010 at 17:2 Comment(0)
R
10

I got the same problem on window 10. Steps to solve the problem:

  1. Locate the .idlerc folder in your profile directory (e.g. C:\Users\{your-username} without the braces).
  2. Delete the .idlerc directory.

It worked for me...

Ratter answered 15/4, 2015 at 9:6 Comment(1)
Did not help my instance of the same problem either.Scrapbook
F
7

In the past, I've often found that when I had some issues with the python.org version of some Python release, specifically on Windows, installing instead the activepython version of the same release, from ActiveState, made the problems go away. So, in your shoes, the first thing I would try would be ActivePython (I don't think they have a 2.7 yet -- it's probably been around for too short a time yet -- but they definitely do have a 3.1).

EDIT: Versions 2.5, 2.6, 2.7, 3.2, 3.3, and 3.4 have been added.

Fennel answered 15/8, 2010 at 17:2 Comment(0)
M
6

I too faced the same problem. But at last solved like this -->

Run Python\Lib\idlelib\idle.py as admin, i got the error that the file "recent-files.lst" can't be opened.

So go to your home folder, show hidden files, click on .idlerc and delete the file named "recent-files". Now IDLE is working...

Murder answered 17/5, 2012 at 22:55 Comment(1)
where can I find .idlerc? What do you mean by home folder?Fastidious
U
4

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 <module>
    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 :-)

Uranography answered 2/7, 2014 at 22:57 Comment(2)
This solved the issue for me (Python 3.4.2 on Windows 7 Pro 64 bit). I added the tcl path in the environment path - it didn't work. Copied the C:\Python34\Lib\tcl8.6 folder in C:\Python34\Lib : now IDLE seems to work properly.Tabina
I also had to copy the tk8.5 folder into C:\Python27\LibPiazza
O
3

Just try to delete the files which end with .idlerc in your profile.

1. Enter <win-r>, and type %USERPROFILE%\.idlerc
2. delete all files in idlerc folder
3. it works on my PC(win7 OS)
Obstruct answered 11/3, 2014 at 2:56 Comment(2)
Where are we supposed to type <win-r>? At the command prompt? Doing so gave me an error.Cioban
<win-r> means open run windowXenocrates
L
2

I ran into this weird situation also, and did a bit of troubleshooting. As a rigorous task, uninstalling, and re-installing the versions of python(2.6, 2.7, 3.1) and all my associated extensions and other site packages: in addition to the subsequent options that others have provided, that may have, or may not have, helped fix issues with the IDLE working properly. I found and error on my part, installing a 32 bit .msi on a 64 bit system causes a runtime .dll error with tkinter and therfore, causes IDLE to not start up properly, or not at all. Be mindful, and don't be a blind bat like me... :)

Lotion answered 30/5, 2013 at 7:49 Comment(0)
C
1

Once I copied the C:\Python27\tcl\tcl8.5 folder to C:\Python27\Lib as suggested in Bogdan's answer the error message "This probably means that Tcl wasn't installed properly" went away. Instead I started seeing "This probably means that tk wasn't installed properly". I had to copy the C:\Python27\tcl\tk8.5 folder to C:\Python27\Lib as well. Once I did that running idle.py from the command line in C:\Python27\Lib\idlelib was error-free.

Cowpea answered 3/2, 2016 at 3:51 Comment(0)
R
0

Run python setup program, change python 2x, choose to entirely remove tcl/tk, proceed, then run setup again, change python again, on the tcl\tk choose entire feature will be installed, proceed.

It worked for me.

Revolutionist answered 23/12, 2014 at 21:25 Comment(0)
K
0

Even I was facing same issue with my code, But It is resolved now. I was using 2.6 which was having old version of Xlrd, so I updated xlrd in 2.7 using pip and I opened my file with 2.7 and it works.

Kalikalian answered 14/10, 2016 at 13:11 Comment(0)
H
0

Delete the .idlerc directory as suggested above, run the python installer again and choose repair. If needed associate the .py files with the python.exe executable in Python27 folder. This worked for me after removing python 3.7.

Houseraising answered 10/9, 2018 at 8:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.