Skip to content

Where is the tcltk package?

17 messages · Erik Iverson, Peter Langfelder, Gabor Grothendieck +3 more

#
Perhaps I'm being even thicker than usual, but I can't find
the tcltk package on CRAN.  There is a tcltk2 package, which says
that it is a collection of supplements to tcltk, but I cannot
see a just-plain tcltk anywhere.

If I try to install tcltk2 (from the Linux command line, or using
install.packages() in R) it complains that it needs tcltk.

If I try to install tcltk using install.packages() it tells me that
this package is not available.

What is going on?

     cheers,

         Rolf Turner
#
Rolf,

What does

 > capabilities("tcltk")

return?
On 04/07/2011 07:15 PM, Rolf Turner wrote:
#
On Thu, Apr 7, 2011 at 8:15 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
In most distributions of R tcltk is already included.  Try

library(tcltk)

and see if you get it.
#
On 08/04/11 12:22, Erik Iverson wrote:
FALSE

     cheers,

         Rolf Turner
#
On 08/04/11 12:30, Gabor Grothendieck wrote:
I get:
My session info is:
cheers,

         Rolf
#
On 04/07/2011 07:32 PM, Rolf Turner wrote:
I believe R needs to be compiled with tcltk support for the package to work. Do 
you compile your own version or use a package manager (e.g., on Ubuntu)?  If you 
have TCL/TK installed in a "standard" location, all should be well I think.

See:

http://cran.r-project.org/doc/manuals/R-admin.html#Tcl_002fTk

On my Ubuntu machine, I have both the "tcl" and the "tk" packages installed 
through Synaptic (the package manager).

HTH,
Erik
#
On Thu, Apr 7, 2011 at 5:32 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
As others have indicated, your R was compiled without Tcl/Tk support.
Most likely because Tcl/Tk was/is not installed on your system, or
perhaps it is in a non-standard location where the configure script
cannot find it.

Peter
#
On Thu, Apr 7, 2011 at 8:32 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
Try re-installng R using these instructions:

http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html
#
On 08/04/11 12:40, Erik Iverson wrote:
I installed R from source; couldn't figure out how to get a Ubuntu binary.
I forget the details (it was a while ago) but nothing seemed to work.

I think I have the tcl/tk stuff in a ``standard location'':

     /usr/lib/libtcl8.4.so.0
     /usr/lib/libtcl8.5.so.0
     /usr/lib/libtk8.4.so.0
     /usr/lib/libtk8.5.so.0
     /usr/share/tcltk/tcl8.4
     /usr/share/tcltk/tcl8.5
     /usr/share/tcltk/tk8.4
     /usr/share/tcltk/tk8.5
I don't grok ``Synaptic''.  I have installed various stuff using
``sudo apt-get install ....'' --- that's about as far as my capabilities 
extend.

     cheers,

         Rolf Turner
#
On 04/07/2011 07:55 PM, Rolf Turner wrote:
<snip>
Synaptic is just a front end to "sudo apt-get" type installs, so same thing. You 
probably need the tcl-dev and tk-dev (or similarly named) for your version of 
tcltk to compile.  Those contain the development headers needed to compile 
programs against the tcltk library.  You can look in the config.log file created 
by the R "configure" process and grep for "tcl" to see what might have gone 
wrong, but my guess is tcl.h or something like that couldn't be found.

So once you install those dev packages, you could rebuild R and check that tcltk 
will work, the results of "configure" should tell you that before you even compile.

Or just install the Ubuntu packages per:

http://cran.r-project.org/bin/linux/ubuntu/

assuming that's your distro.

HTH,
erik
#
In view of various bits of advice I've received I tried:

(1) sudo apt-get install r-base r-base-dev

The result:
No improvement in the situation; capabilities("tcltk") still returns FALSE.

(2) re-installing R from source, first doing

     ./configure --with-tcltk

Again no improvement; capabilities("tcltk") still returns FALSE.

WTF?  Why do these things always happen to ***me***? :-)

     cheers,

         Rolf Turner
#
On 08/04/11 13:23, Erik Iverson wrote:
So how the <expletive deleted> do I ``install those dev packages''?
I don't follow this; went to that URL; nothing there about tcltk.

         cheers,

             Rolf Turner
#
On 08/04/11 13:23, Erik Iverson wrote:
<SNIP>
<SNIP>

Grep/groping around I found:
So your conjecture would appear to be spot on.  But what do I ***do*** 
about it?

     cheers,

         Rolf Turner
#
Rolf -
    In order for R to build with tcltk support, the tcl/tk development
packages need to be available when R is configured.  This command

apt-get install tcl8.5-dev tk8.5-dev

will install the necessary development packages, but you'll need to
reconfigure and rebuild R in order to get tcltk support,
                                                  - Phil
On Fri, 8 Apr 2011, Rolf Turner wrote:

            
#
On 08/04/11 13:49, Phil Spector wrote:
Ah-ha!  I think that is the answer I was looking for.

Thanks Phil.

     cheers,

         Rolf
#
Summary of what I've learned:

(1) The tcltk package ***comes with R***; one does not install it from CRAN.

(2) In order for it to work, you need to have the *development* version of
tcltk installed on your system.

(3) Under Ubuntu Linux you can obtain the aforesaid development version by:

     sudo apt-get install tcl8.5-dev tk8.5-dev

(I still don't know what one does if that number 8.5 changes --- as new
releases come about.  How does one find out the number of the latest
release of tcl/tk?)

I hope that this may be of use to someone in the future.

     cheers,

         Rolf Turner

P. S.  Another thing I learned over the course of this inquiry is that I can
get the binary of R for Ubuntu (and save a bit of time and effort over
the process of installing from source) via

     sudo apt-get install r-base r-base-dev


         R. T.
#
On Fri, 8 Apr 2011, Rolf Turner wrote:

            
Happens about once a decade, so nothing much to worry about.  But the 
short answer is the install the -dev packages matching those packages 
you already have installed.

[Tcl/Tk 8.6 is in beta, and has had no progress for 18 months.]
Following the current manual is likely to be more useful to them. 
Let's see: Appendix A:

Remember that some package management systems (such as RPM and deb) 
make a distinction between the user version of a package and the 
development version. The latter usually has the same name but with the 
extension `-devel' or `-dev': you need both versions installed.

The tcltk package needs Tcl/Tk >= 8.4 installed: the sources are 
available at http://www.tcl.tk/.
...