[Pkg-tcltk-devel] Bug#889810: Bug#889810: tk: 'wish' gives console error message; tclsh can't find package Tk

Jasper Taylor jasper at simulistics.com
Wed Feb 7 11:35:36 UTC 2018


Hi Sergei,

On Wed, 7 Feb 2018 13:36:47 +0300 Sergei Golovan wrote:
 > tags 889810 + moreinfo
 > thanks
 >
 > Hi Jasper,
 >
 > On Wed, Feb 7, 2018 at 12:35 PM, Jasper Taylor wrote:
 > > Package: tk
 > > Version: 8.6.0+9
 > > Severity: important
 > >
 > > Dear Maintainer,
 > >
 > > I found I could not run my Tk-based application. I was starting it 
with a tclsh
 > > script which then executed "package require Tk" and this command 
was raising an
 > > error: "Can't find package Tk".
 > >
 > > When running 'wish' from the command line a console error message 
appears as
 > > follows:
 > >
 > >>application-specific initialization failed: Can't find a usable 
tk.tcl in the
 > > following directories:
 > >> /usr/local/lib/tcl8.6/tk8.6 /usr/local/lib/tk8.6 /usr/lib/>tk8.6
 > > /usr/lib/tk8.6 /lib/tk8.6 /usr/library
 >
 > Judging by a lot of /usr/local in the output I'd say that you have 
some locally
 > installed Tcl/Tk distribution and `wish' is actually
 > `/usr/local/bin/wish'. Can you check
 > this? Does /usr/bin/wish run properly when a full path is specified?

Thanks for looking at my problem. I don't have anything relevant under 
/usr/local -- the search paths are built into the package.

I also have access to a Debian system with tk 8.6.0+8 installed. On this 
system, I run tclsh and type

set auto_path

and get

/usr/share/tcltk/tcl8.6 /usr/share/tcltk /usr/lib /usr/local/lib/tcltk 
/usr/local/share/tcltk /usr/lib/tcltk/x86_64-linux-gnu /usr/lib/tcltk 
/usr/lib/tcltk/tcl8.6

and then running

package require Tk

returns 8.6.2 and opens a toplevel Tk window.

Now on my own system with tk 8.6.0+9I run tclsh and type

set auto_path

and get

/usr/local/lib/tcl8.6 /usr/local/lib /usr/lib

If I then type

set auto_path {/usr/share/tcltk/tcl8.6 /usr/share/tcltk /usr/lib 
/usr/local/lib/tcltk /usr/local/share/tcltk 
/usr/lib/tcltk/x86_64-linux-gnu /usr/lib/tcltk /usr/lib/tcltk/tcl8.6}

(so it is the same as it was in 8.6.0+8) then

package require Tk

it returns 8.6.6 and opens a toplevel window. I have added a line to my 
script to set the auto_path to the old value and my application now runs 
OK, although tk and wish should not need this.
Cheers
     Jasper

 >
 > Cheers!
 > --
 > Sergei Golovan
 >
 >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-tcltk-devel/attachments/20180207/2323f1f9/attachment.html>


More information about the Pkg-tcltk-devel mailing list