You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) on Windows Vista
Home Premium.
IDLE won't start if not installed in the default directory.
When insalled in a custom directory, running idle.py
(\Lib\idlelib\idle.py) produces this error:
"Traceback (most recent call last):
File "C:\Programmer\Python\lib\idlelib\idle.py", line 21, in <module>
idlelib.PyShell.main()
File "C:\Programmer\Python\lib\idlelib\PyShell.py", line 1390, in main
root= Tk(className="Idle")
File "C:\Programmer\Python\lib\idlelib\Tkinter.py", line 1636, in
__init__ self.tk = _tkinter.create(screenName, baseName, className,
interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the followingdirectories: {C:\Programmer\Python\tcl\tcl8.4}
{C:\Programmer\Python\tcl\tcl8.4} C:/Programmer/Python/tcl/tcl8.4
C:/Programmer/Python/lib/tcl8.4 C:/Programmer/Python/lib/tcl8.4
C:/lib/tcl8.4 C:/library C:/tcl8.4/library
This probable means that Tcl wasn't installed properly."
Do you have TCL_DIR or TK_DIR environment variables set?
kimsey0 commented on Sep 16, 2008
kimsey0mannequin
MannequinAuthor
More actions
No, nothing.
It's just a standart clean installation.
zlm commented on Jan 17, 2009
zlmmannequin
Mannequin
More actions
Hi. I have the same problem, but i'm running Pyhton 2.6.1. I'm using
Windows Vista 32bit SP1.
I installed Python to C:\Program Files\Python\2.6\ and when I try to run
idle from the start menu, it doesn't work.
When I try to run it from the command line, the same error is displayed:
"C:\Program Files\Python\2.6\Lib\idlelib>python idle.py
Traceback (most recent call last):
File "idle.py", line 21, in <module>
idlelib.PyShell.main()
File "C:\Programas\Python\2.6\lib\idlelib\PyShell.py", line 1386, in main
root = Tk(className="Idle")
File "C:\Programas\Python\2.6\lib\lib-tk\Tkinter.py", line 1643, 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 followingdirectories:
{C:\Programas\Python\2.6\tcl\tcl8.5}
C:/Programas/Python/2.6/lib/tcl8.5 C:/P
rogramas/Python/lib/tcl8.5 C:/Programas/lib/tcl8.5
C:/Programas/Python/library C
:/Programas/library C:/Programas/tcl8.5.2/library C:/tcl8.5.2/library
This probably means that Tcl wasn't installed properly."
loewis commented on Jan 17, 2009
loewismannequin
Mannequin
More actions
zlm, did you chose to install Tcl/Tk when installing Python?
zlm commented on Jan 17, 2009
zlmmannequin
Mannequin
More actions
Yes, I did.
loewis commented on Jan 17, 2009
loewismannequin
Mannequin
More actions
Yes, I did.
So do you have a file C:\Programas\Python\2.6\tcl\tcl8.5\init.tcl ?
zlm commented on Jan 17, 2009
zlmmannequin
Mannequin
More actions
So do you have a file C:\Programas\Python\2.6\tcl\tcl8.5\init.tcl ?
Yes, I have.
Could this problem be related to paths with slashes and backslashes? In
the error log, the first path (the right one) has backslashes, but the
others have slashes.
Could this problem be related to paths with slashes and backslashes?
Unlikely. The exact same package works on many other machines, so there
must be something strange with your machine.
Can you run the Sysinternals filemon to find out what files it is accessing?
kimsey0 commented on Jan 17, 2009
kimsey0mannequin
MannequinAuthor
More actions
I don't think it's just his machine (and mine), but i don't think so.
Unfortunealy, i don't have a Windows Vista key ready, else i'd have
testet it on a clean install, but i'll try to install the same package
on the next computer with Vista i stumple upon.
zlm commented on Jan 17, 2009
zlmmannequin
Mannequin
More actions
Can you run the Sysinternals filemon to find out what files it is
accessing?
I tried Sysinternals ProcessMonitor (equivalent of filemon to Windows
Vista), but the simple act of trying to open IDLE produces thousands of
entries to the log window.
I also don't think this is a problem of my machine, because i'm not the
only one with this problem. I think this situation can be easily
reproduced by installing Pyhton to other than the default path on
Windows Vista.
4 remaining items
loewis commented on Jan 18, 2009
loewismannequin
Mannequin
More actions
I don't think thats the solution.
"C:\Program Files\Python\2.6\" and
"C:\Programas\Python\2.6\"
are the same, as "C:\Program Files\Python\2.6\" is a symbolic link to
"C:\Programas\Python\2.6\" to allow compatibility with different
operation system languages.
It could be a hint to the problem, though.
Jacob: what language version is your Vista installation? Is
"c:\Programmer" the local translation of "c:\Program Files"?
Perhaps something doesn't work right with symbolic links on Vista.
Unfortunately, I have only the English version of Vista for testing.
Can you two please install Python into a non-standard folder that
isn't a symbolic link?
kimsey0 commented on Jan 18, 2009
kimsey0mannequin
MannequinAuthor
More actions
Great idea :)
Maybe we're starting to find the problem.
I'm using a Danish version of Windows Vista Home Premium SP1, and
C:\Programmer is the danish path for C:\Program Files.
I'll try that, and leave another message when i'we tried it.
zlm commented on Jan 18, 2009
zlmmannequin
Mannequin
More actions
"Programas" is the portuguese translation to "Program Files".
I have just installed it to C:\Test\Python and IDLE is working!
The problem should be related to the Vista symbolic links.
loewis commented on Jan 18, 2009
loewismannequin
Mannequin
More actions
The problem should be related to the Vista symbolic links.
Unfortunately, it isn't as simple as "install into a symbolic
link, and it fails". I created c:\temp -> c:\tmp, and installed
into c:\temp (i.e. into the symlink), and it still worked fine.
devdanzin commented on Jan 19, 2009
devdanzinmannequin
Mannequin
More actions
Maybe it's "install into a symbolic link pointing to a path with spaces
in it, and idle fails"?
zlm commented on Jan 19, 2009
zlmmannequin
Mannequin
More actions
I reinstalled Python to "C:\Program Files\Python\" (I wrote this path in
the installer) and IDLE works fine. I can access the Python folder by
going to "C:\Programas\Python".
Then, I unninstalled and installed again to "C:\Programas\Python". IDLE
doesn't work. I can still access the Python folder by going to
"C:\Programas\Python".
Jacob, can you try installing it to "C:\Program Files\Python" to sse if
that works?
kimsey0 commented on Jan 20, 2009
kimsey0mannequin
MannequinAuthor
More actions
Installing to C:\Program Files\Python\ worked.
Now we just have to find out WHY it doesn't work with the
C:\[Programmer/Programmas]\ to C:\Program Files\ link.
loewis commented on Jan 20, 2009
loewismannequin
Mannequin
More actions
Installing to C:\Program Files\Python\ worked.
Now we just have to find out WHY it doesn't work with the
C:\[Programmer/Programmas]\ to C:\Program Files\ link.
With process monitor, I made partial progress (after installing
the German Vista version). It looks like that there is an explicit
Deny ACL entry for read for Everyone in the Programme symlink.
As a consequence, os.listdir(r"c:\programme") fails, even though
os.listdir(r"c:\program files") succeeds. It looks like Tcl wants
to list the contents of the symlink (I'm not yet sure why), and
that this fails (ACCESS_DENIED).
loewis commented on Jan 22, 2009
loewismannequin
Mannequin
More actions
Here is a patch that should fix the problem. It uses Vista's
GetFinalPathNameByHandleW to expand symbolic links before passing the
path to Tcl.
kimsey0 commented on Jan 22, 2009
kimsey0mannequin
MannequinAuthor
More actions
Fantastic.
I started this post in October, and now we finaly found a solution.
Thank you Martin.
Will this patch be included in future versions of python?
Best regards, Jacob.
zlm commented on Jan 23, 2009
zlmmannequin
Mannequin
More actions
I got my problem fixed in 4 days!
Thank you for all your help, Martin!
Activity
kimsey0 commentedon Sep 16, 2008
Hello.
I run Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) on Windows Vista
Home Premium.
IDLE won't start if not installed in the default directory.
When insalled in a custom directory, running idle.py
(\Lib\idlelib\idle.py) produces this error:
This probable means that Tcl wasn't installed properly."
loewis commentedon Sep 16, 2008
Do you have TCL_DIR or TK_DIR environment variables set?
kimsey0 commentedon Sep 16, 2008
No, nothing.
It's just a standart clean installation.
zlm commentedon Jan 17, 2009
Hi. I have the same problem, but i'm running Pyhton 2.6.1. I'm using
Windows Vista 32bit SP1.
I installed Python to C:\Program Files\Python\2.6\ and when I try to run
idle from the start menu, it doesn't work.
When I try to run it from the command line, the same error is displayed:
This probably means that Tcl wasn't installed properly."
loewis commentedon Jan 17, 2009
zlm, did you chose to install Tcl/Tk when installing Python?
zlm commentedon Jan 17, 2009
Yes, I did.
loewis commentedon Jan 17, 2009
So do you have a file C:\Programas\Python\2.6\tcl\tcl8.5\init.tcl ?
zlm commentedon Jan 17, 2009
Yes, I have.
Could this problem be related to paths with slashes and backslashes? In
the error log, the first path (the right one) has backslashes, but the
others have slashes.
" {C:\Programas\Python\2.6\tcl\tcl8.5}
C:/Programas/Python/2.6/lib/tcl8.5 C:/P
rogramas/Python/lib/tcl8.5 C:/Programas/lib/tcl8.5
C:/Programas/Python/library C
:/Programas/library C:/Programas/tcl8.5.2/library C:/tcl8.5.2/library"
loewis commentedon Jan 17, 2009
Unlikely. The exact same package works on many other machines, so there
must be something strange with your machine.
Can you run the Sysinternals filemon to find out what files it is accessing?
kimsey0 commentedon Jan 17, 2009
I don't think it's just his machine (and mine), but i don't think so.
Unfortunealy, i don't have a Windows Vista key ready, else i'd have
testet it on a clean install, but i'll try to install the same package
on the next computer with Vista i stumple upon.
zlm commentedon Jan 17, 2009
I tried Sysinternals ProcessMonitor (equivalent of filemon to Windows
Vista), but the simple act of trying to open IDLE produces thousands of
entries to the log window.
I also don't think this is a problem of my machine, because i'm not the
only one with this problem. I think this situation can be easily
reproduced by installing Pyhton to other than the default path on
Windows Vista.
4 remaining items
loewis commentedon Jan 18, 2009
It could be a hint to the problem, though.
Jacob: what language version is your Vista installation? Is
"c:\Programmer" the local translation of "c:\Program Files"?
Perhaps something doesn't work right with symbolic links on Vista.
Unfortunately, I have only the English version of Vista for testing.
Can you two please install Python into a non-standard folder that
isn't a symbolic link?
kimsey0 commentedon Jan 18, 2009
Great idea :)
Maybe we're starting to find the problem.
I'm using a Danish version of Windows Vista Home Premium SP1, and
C:\Programmer is the danish path for C:\Program Files.
I'll try that, and leave another message when i'we tried it.
zlm commentedon Jan 18, 2009
"Programas" is the portuguese translation to "Program Files".
I have just installed it to C:\Test\Python and IDLE is working!
The problem should be related to the Vista symbolic links.
loewis commentedon Jan 18, 2009
Unfortunately, it isn't as simple as "install into a symbolic
link, and it fails". I created c:\temp -> c:\tmp, and installed
into c:\temp (i.e. into the symlink), and it still worked fine.
devdanzin commentedon Jan 19, 2009
Maybe it's "install into a symbolic link pointing to a path with spaces
in it, and idle fails"?
zlm commentedon Jan 19, 2009
I reinstalled Python to "C:\Program Files\Python\" (I wrote this path in
the installer) and IDLE works fine. I can access the Python folder by
going to "C:\Programas\Python".
Then, I unninstalled and installed again to "C:\Programas\Python". IDLE
doesn't work. I can still access the Python folder by going to
"C:\Programas\Python".
Jacob, can you try installing it to "C:\Program Files\Python" to sse if
that works?
kimsey0 commentedon Jan 20, 2009
Installing to C:\Program Files\Python\ worked.
Now we just have to find out WHY it doesn't work with the
C:\[Programmer/Programmas]\ to C:\Program Files\ link.
loewis commentedon Jan 20, 2009
With process monitor, I made partial progress (after installing
the German Vista version). It looks like that there is an explicit
Deny ACL entry for read for Everyone in the Programme symlink.
As a consequence, os.listdir(r"c:\programme") fails, even though
os.listdir(r"c:\program files") succeeds. It looks like Tcl wants
to list the contents of the symlink (I'm not yet sure why), and
that this fails (ACCESS_DENIED).
loewis commentedon Jan 22, 2009
Here is a patch that should fix the problem. It uses Vista's
GetFinalPathNameByHandleW to expand symbolic links before passing the
path to Tcl.
kimsey0 commentedon Jan 22, 2009
Fantastic.
I started this post in October, and now we finaly found a solution.
Thank you Martin.
Will this patch be included in future versions of python?
Best regards, Jacob.
zlm commentedon Jan 23, 2009
I got my problem fixed in 4 days!
Thank you for all your help, Martin!
loewis commentedon Jan 24, 2009
Committed as r68893, r68894, r68898, r68901.
ggenellina commentedon Nov 16, 2009
This patch had unintended consequences; see bpo-6906