TclApp can't find a package

Posted by kevinw on 2006-07-10 13:50
OS: All / Any | Product: Tcl Dev Kit | tags: library package tclapp

I try to wrap my TclApp application and TclApp says it can't find a package that I know I have installed. It's in my package search list -- what do I do?


If you're trying to wrap a package in TclApp and it can't find a dependent package that ships with ActiveTcl you have specified, try the following:

  • locate the .tap file in the package's directory
  • open the .tap file and ensure that the capitalization in the TclApp definition matches that found in the Package directive of the .tap file

Though the package's filename or directory may not be capitalized, it is what is found in the .tap file that matters for TclApp.

edwin | Wed, 2008-03-26 12:26

I have installed ActiveTcl and TclDevKit 4.0.4 (trial license), I need to generate a executable of my script tcl.

I use tclsh and it works well, but, generating an executable from TclDevKit with the following command:

tclapp.exe -prefix C:\Tcl\bin\base-tk-thread-win32-ix86.exe -out myapp.exe C:\Tcl\demos\Expect\mejorcito.tcl

At the moment I have the following files in C:\Tcl\bin:


mejorcito.tcl is a script that use expect and below it is the code:

# \
exec tclsh "$0" ${1+"$@"}

# This is required to declare that we will use Expect
package require Expect

# 1. Open a telnet session
spawn telnet

I get the following error message:

can't find package Expect while executing "package require Expect" (file "C:/TclDevKit/bin/myapp.exe/lib/application/Tcl/demos/Expect/mejorcito.tcl" line 37) invoked from within "source $startup" (file "C:/TclDevKit/bin/myapp.exe/main.tcl" line 51)

Please help my to find a solution
My email is:

skycam37 | Sat, 2009-11-21 15:41

I'm using TclDevKit 5.1, and am trying to generate a Windows executable using "package require tls." My problem is that tls doesn't show up in the list of packages available to add to the wrap, in TclApp.

If I ask for a scan for available packages, tls appears in the list, but when try to run the wrap, I get an error message saying "tls -is profile not known." But tclsh runs the tcl source code with no problem.

So what's going on here? Why does tclsh find tls OK, but TclApp can't?


shiva_ | Fri, 2011-12-16 11:32

Can someone please post the steps to follow to make the tcl&expect script into executable file.
i.e something like scc2.tcl into scc2.exe and scc2.tcl is scripted using both tcl and expect.
I followed the procedure at the below link it's very easy but the scc2.exe file giving an errors
like (
can't find package Expect
while executing
"package require Expect"

But scc2.tcl, which i executed on win-32 OS ran without any errors and it's working fine. Can someone help me to make windows-32 executable file from the script...

And also it is not giving any errors if we develop the code only in tcl without using expect...


ActiveState Staff
Wed, 2012-01-18 17:40

This might apply to you Shiva:

Best place to get help is in the forums.