error: _tkinter.TclError: can't find Img - Solved

More
30 Oct 2015 04:43 - 03 Nov 2015 07:15 #64489 by toolmaker69
Hello,

I just installed the simulator on Ubuntu 14.04 on an intel 64 bit server. I am looking to just get backplots as I build a micromilling machine. So on this server I am just looking to use axis.

I get the startup menu, click on simulator: axis, some windows pop up for a second or less, and I get:

LINUXCNC - 2.8.0~pre1
Machine configuration directory is '/home/len/git/linuxcnc/configs/sim/axis'
Machine configuration file is 'axis.ini'
Starting LinuxCNC...
Found file(lib): /home/len/git/linuxcnc/lib/hallib/core_sim.hal
Note: Using POSIX non-realtime
Found file(lib): /home/len/git/linuxcnc/lib/hallib/sim_spindle_encoder.hal
Found file(lib): /home/len/git/linuxcnc/lib/hallib/axis_manualtoolchange.hal
Found file(lib): /home/len/git/linuxcnc/lib/hallib/simulated_home.hal
Found file(REL): ./check_constraints.hal
Traceback (most recent call last):
File "/home/len/git/linuxcnc/bin/axis", line 123, in <module>
nf.start(root_window)
File "/home/len/git/linuxcnc/lib/python/nf.py", line 119, in start
source_lib_tcl(r, "support.tcl")
File "/home/len/git/linuxcnc/lib/python/nf.py", line 111, in source_lib_tcl
r.tk.call("source", os.path.join(tcl_libdir, f))
_tkinter.TclError: can't find package Img
Shutting down and cleaning up LinuxCNC...
task: 1487 cycles, min=0.000014, max=0.006182, avg=0.001075, 0 latency excursions (> 10x expected cycle time of 0.001000s)
Note: Using POSIX non-realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/len/linuxcnc_debug.txt
and
/home/len/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal


So I tried installing img two times:

len@len-X7DA8:~/git/linuxcnc$ sudo apt-get install libtk-img
[sudo] password for len:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libtk-img is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

len@len-X7DA8:~/git/linuxcnc$ sudo apt-get install libtk8.5-img
[sudo] password for len:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libtk8.5-img
E: Couldn't find any package by regex 'libtk8.5-img'


Please, what am I doing wrong?

EDIT:
Maybe I didn't give enough information:

It was working fine in Ubuntu 12.04, but then I upgraded the system to 14.04. So I fetched the latest from Git and reinstalled. First I needed to install tcl and tk 8.6 to pass the preinstall, but then upon install I needed to remove them and install the 8.5 devs. So the tcl/tk might be messed up somehow.
Last edit: 03 Nov 2015 07:15 by toolmaker69. Reason: Solved

Please Log in or Create an account to join the conversation.

More
03 Nov 2015 07:14 - 03 Nov 2015 07:16 #64651 by toolmaker69
Okay, solved.

After trying *everything*, the last thing I tried finally did the trick.

The problem seems to be that I have Anaconda installed. I tried upgrading it to Python 3.4, but had more tcl problems, so I did the trick of starting it in 2.7 Python mode. When I did, I saw that the Anaconda version of python is a Red Hat version. Oops.

So I went to .bashrc and removed the references that start python from anaconda instead of Trusty Tahr's version. After that I did a plain vanilla install, without any special tags denoting tcl or tk. By then, linux knew which directory to search and so on from previous tries.

I didn't bother doing a setuid because it's just a simulator and I wished to keep the install as uncomplex as possible.

So here is what worked:

python ' checked the version of python
less .bashrc ' looked for ananconda's links
gksudo gedit .bashrc 'removed anaconda launch of python
**************** logged out, then logged back in
cd git/linuxcnc/debian
./configure sim
cd ..
dpkg-checkbuilddeps
cd src
./autogen.sh
./configure --enable-simulator
make clean
make
cd ..
linuxcnc

I hope this helps someone else.
Last edit: 03 Nov 2015 07:16 by toolmaker69.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum