Tkinter calls fail in fresh VirtualEnv
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Virtualenv |
New
|
Undecided
|
Unassigned |
Bug Description
Environment:
Tested on Windows XP SP3 and Windows 7
Python 2.6.3
Virtualenv 1.3.4
Within a fresh, just activated VirtualEnv, I get the following error trying to run a simple Tkinter window:
H:\My Documents\
New python executable in H:\testvirtuale
Installing setuptools.
H:\My Documents\
(testvirtualenv) H:\My Documents\
Python 2.6.3 (r263rc1:75186, Oct 2 2009, 20:40:30) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> Tkinter._test()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python26\
root = Tk()
File "C:\Python26\
self.tk = _tkinter.
objects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
C:/
tualenv/library H:/library H:/tcl8.5.2/library H:/tcl8.5.2/library
This probably means that Tcl wasn't installed properly.
>>>
Virtualenv does not copy the Tcl library file(s) (or any core C extensions, that I can see) to the new virtualenv, but instead adds a reference to the PYTHONPATH. If I copy the "tcl" folder from C:\Python26\ over to the root of the new Virtualenv, Tkinter.Tk() shows a new window without throwing an exception.