TransWikia.com

How do I let Ubuntu find the install path for tcl?

Ask Ubuntu Asked by Eli Sander on November 18, 2021

I am running Ubuntu 16.04. I am trying to install the R package tcltk. When I run install.packages('tcltk'), I get the following error:

Installing package into ‘/home/esander/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: Can't find a usable init.tcl in the following directories: 
    /opt/anaconda1anaconda2anaconda3/lib/tcl8.5 ./lib/tcl8.5 ./lib/tcl8.5 ./library ./library ./tcl8.5.18/library ./tcl8.5.18/library

My first thought was to uninstall and reinstall tcl. I did so, and now if I run sudo apt-get install tcl, it says that it is at the newest version (8.6.0+9). Ok, so it seems that R is looking for tcl in strange places (and is looking for tcl 8.5), so I want to find the path and somehow link R to it. But when I run whereis tcl, I get:

tcl:

Apparently Ubuntu can’t find the install path. I tried to find it the brute-force way, running find / -name tcl 2> /dev/null, and I got:

/usr/share/ruby-rouge/demos/tcl
/usr/share/doc/tcl
/home/esander/anaconda3/lib/python3.5/site-packages/notebook/static/components/codemirror/mode/tcl
/home/esander/anaconda3/pkgs/notebook-4.2.1-py35_0/lib/python3.5/site-packages/notebook/static/components/codemirror/mode/tcl
/home/esander/.conda/envs/my_root/lib/python3.5/site-packages/notebook/static/components/codemirror/mode/tcl

These locations either seem like documentation, or things specific to ipython notebooks. I don’t fully understand this, but clearly there are linking/installation problems of some kind. How do I find tcl or install it so that a normal install path appears?

One Answer

I was breaking my head on the same issue. Apparently I set ~/anaconda3 as my working directory and it worked! Probably because ./lib/tcl8.5/init.tcl is on the path now.

Answered by NoName on November 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP