1.5.2 NT install question(s) - partial answer
Mark Jackson
mjackson at wc.eso.mc.xerox.com
Thu Sep 9 23:17:40 EDT 1999
mjackson at wc.eso.mc.xerox.com (Mark Jackson) writes:
> I've done this twice recently and encountered problems both times.
>
> On a fresh system (never had Python or Tcl/Tk) things (for example,
> PySol) seem to work, but whenever I use Tkinter (specifically, when
> _tkinter is imported) I get a warning box about not being able to find
> tcl80.dll in the specified path. (tcl80.dll is present, in Program
> Files\Tcl\bin.) What's wrong, and how do I put it right?
Solution: put Tcl/bin into the PATH variable through the System
environment tab. Made easier by reinstalling Python and Tcl outside
Program Files (avoiding the evil space-in-filename issue) which however
was not effective in itself. Thanks to those who suggested augmenting
PATH> Not clear why this was necessary after an apparently
trouble-free install on this particular system, but then it's NT. . .
> On a system where 1.5.1 (with Tcl/Tk) had previously been installed, I
> carefully uninstalled both before installing 1.5.2. Here both "import
> _tkinter" and "inport Tkinter" are OK, but Tkinter._test() yields:
>
> TclError: Can't find a usable init.tcl in the following directories:
> {} ./lib/tcl8.0 D:/tc18.0/library {D:/Program Files/library}
>
> This probably means that Tcl wasn't installed properly.
>
> (init.tcl is present, in Program Files\Tcl\lib\tcl8.0.) What's wrong,
> and how do I put it right?
Still working on this one. Reinstalling Python and Tcl outside Program
Files changes the error message:
>>> import Tkinter
>>> Tkinter._test()
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "D:\Python\Lib\lib-tk\Tkinter.py", line 1947, in _test
root = Tk()
File "D:\Python\Lib\lib-tk\Tkinter.py", line 886, in __init__
self.tk = _tkinter.create(screenName, baseName, className)
TclError: Can't find a usable tk.tcl in the following directories:
. D:/Tcl/lib/tk8.0 ./tk8.0 ./lib/tk8.0 ./library ./tk8.0/library ./library D
:/Tcl/tk8.0/library
D:/Tcl/lib/tk8.0/tk.tcl: bad event type or keysym "MouseWheel"
bad event type or keysym "MouseWheel"
while executing
"bind Listbox <MouseWheel> {
%W yview scroll [expr - (%D / 120) * 4] units
}"
(file "D:/Tcl/lib/tk8.0/listbox.tcl" line 179)
invoked from within
"source [file join $tk_library listbox.tcl]"
(file "D:/Tcl/lib/tk8.0/tk.tcl" line 151)
invoked from within
"source D:/Tcl/lib/tk8.0/tk.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $tkfile]"
This probably means that Tk wasn't installed properly.
Note that tk.tcl is present, in D:/Tcl/lib/tk8.0, contrary to the error
message. I've exercised some of the Tk demos directly and they seem
OK. Suggestions?
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
Spend the optimal amount of time on each decision
and pretty soon you run out of life.
- Steven Waldman
More information about the Python-list
mailing list