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
Where is the tcltk package?
17 messages · Erik Iverson, Peter Langfelder, Gabor Grothendieck +3 more
Rolf,
What does
> capabilities("tcltk")
return?
On 04/07/2011 07:15 PM, Rolf Turner wrote:
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
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On Thu, Apr 7, 2011 at 8:15 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
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?
In most distributions of R tcltk is already included. Try library(tcltk) and see if you get it.
Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
On 08/04/11 12:22, Erik Iverson wrote:
Rolf, What does
> capabilities("tcltk")
return?
FALSE
cheers,
Rolf Turner
On 08/04/11 12:30, Gabor Grothendieck wrote:
On Thu, Apr 7, 2011 at 8:15 PM, Rolf Turner<r.turner at auckland.ac.nz> wrote:
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?
In most distributions of R tcltk is already included. Try library(tcltk) and see if you get it.
I get:
library(tcltk)
Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for 'tcltk'
My session info is:
sessionInfo()
R version 2.12.2 (2011-02-25) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] datasets utils stats graphics grDevices methods base other attached packages: [1] misc_0.0-13 gtools_2.6.2 spatstat_1.21-7 deldir_0.0-13 [5] mgcv_1.7-3 fortunes_1.4-0 MASS_7.3-11 loaded via a namespace (and not attached): [1] grid_2.12.2 lattice_0.19-17 Matrix_0.999375-46 nlme_3.1-98
cheers,
Rolf
On 04/07/2011 07:32 PM, Rolf Turner wrote:
On 08/04/11 12:22, Erik Iverson wrote:
Rolf, What does
capabilities("tcltk")
return?
FALSE
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
cheers, Rolf Turner
On Thu, Apr 7, 2011 at 5:32 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
On 08/04/11 12:22, Erik Iverson wrote:
Rolf,
What does
?> ?capabilities("tcltk")
return?
FALSE
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:
On 08/04/11 12:22, Erik Iverson wrote:
Rolf,
What does
?> ?capabilities("tcltk")
return?
FALSE ? ?cheers,
Try re-installng R using these instructions: http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html
Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
On 08/04/11 12:40, Erik Iverson wrote:
On 04/07/2011 07:32 PM, Rolf Turner wrote:
On 08/04/11 12:22, Erik Iverson wrote:
Rolf, What does
capabilities("tcltk")
return?
FALSE
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.
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
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).
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:
On 08/04/11 12:40, Erik Iverson wrote:
On 04/07/2011 07:32 PM, Rolf Turner wrote:
On 08/04/11 12:22, Erik Iverson wrote:
Rolf, What does
capabilities("tcltk")
return?
FALSE
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.
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'':
<snip>
On my Ubuntu machine, I have both the "tcl" and the "tk" packages installed through Synaptic (the package manager).
I don't grok ``Synaptic''. I have installed various stuff using ``sudo apt-get install ....'' --- that's about as far as my capabilities extend.
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:
Reading package lists... Done Building dependency tree Reading state information... Done r-base is already the newest version. r-base-dev is already the newest version. The following packages were automatically installed and are no longer required: linux-headers-2.6.32-28-generic linux-headers-2.6.32-28 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
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:
On 04/07/2011 07:55 PM, Rolf Turner wrote:
On 08/04/11 12:40, Erik Iverson wrote:
On 04/07/2011 07:32 PM, Rolf Turner wrote:
On 08/04/11 12:22, Erik Iverson wrote:
Rolf, What does
capabilities("tcltk")
return?
FALSE
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.
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'':
<snip>
On my Ubuntu machine, I have both the "tcl" and the "tk" packages installed through Synaptic (the package manager).
I don't grok ``Synaptic''. I have installed various stuff using ``sudo apt-get install ....'' --- that's about as far as my capabilities extend.
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.
So how the <expletive deleted> do I ``install those dev packages''?
Or just install the Ubuntu packages per: http://cran.r-project.org/bin/linux/ubuntu/ assuming that's your distro.
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>
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.
<SNIP> Grep/groping around I found:
configure:31311: checking for tclConfig.sh configure:31344: result: no configure:31353: checking for tclConfig.sh in library (sub)directories configure:31374: result: no configure:31386: checking for tkConfig.sh configure:31419: result: no configure:31428: checking for tkConfig.sh in library (sub)directories configure:31449: result: no configure:31547: checking for tcl.h conftest.c:201:17: error: tcl.h: No such file or directory configure:31571: result: no
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 12:40, Erik Iverson wrote:
On 04/07/2011 07:32 PM, Rolf Turner wrote:
On 08/04/11 12:22, Erik Iverson wrote:
Rolf, What does
capabilities("tcltk")
return?
FALSE
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.
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
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).
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
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On 08/04/11 13:49, Phil Spector wrote:
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,
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:
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?)
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.]
I hope that this may be of use to someone in the future.
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/. ...
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595