Missing Tkinter dependency note
Qub3k opened this issue · 4 comments
I just installed vanilla Ubuntu 18.04 LTS. Following the wiki I tried to issue "./run_subj". When doing so I got the following output:
Traceback (most recent call last):
File "./run_subj", line 9, in <module>
from sureal.routine import run_subjective_models
File "/home/jakub/Workspace/sureal/python/src/sureal/routine.py", line 2, in <module>
from matplotlib import pyplot as plt
File "/home/jakub/.local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 115, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/home/jakub/.local/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
[backend_name], 0)
File "/home/jakub/.local/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 4, in <module>
from . import tkagg # Paint image to Tk photo blitter extension.
File "/home/jakub/.local/lib/python2.7/site-packages/matplotlib/backends/tkagg.py", line 5, in <module>
from six.moves import tkinter as Tk
File "/home/jakub/.local/lib/python2.7/site-packages/six.py", line 203, in load_module
mod = mod._resolve()
File "/home/jakub/.local/lib/python2.7/site-packages/six.py", line 115, in _resolve
return _import_module(self.mod)
File "/home/jakub/.local/lib/python2.7/site-packages/six.py", line 82, in _import_module
__import__(name)
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package
I believe it would be beneficial to mention in the wiki that the Tkinter module is necessary to run this code.
This might be a platform-dependent issue. We are working toward packaging/publishing sureal as a pypi package. Hopefully the issue is going away after that.
It is possible that it is a platform-dependent issue. In my case it is even more complicated because I had to install the Ubuntu 18.04 LTS Server version, which is stripped of all GUI-related packages. That may be the problem.
FWIW, same observation as Qub3k. On ubuntu 18.04 desktop edition, Tkinter isn't part of the default python/python3 install; the additional packages python-tk / python3-tk have to be installed explicitly from ubuntu repositories via apt. Not a breaking issue, would be nice to see the dependencies/install guide mention this.
I've created a PR for this.