Page MenuHomePhabricator

Please install python3-tk on toolforge nodes
Closed, ResolvedPublic

Description

I want to use matplotlib to generate some image charts on toolforge (https://gitlab.com/legoktm/tool-coverage/blob/master/chart.py)

(venv)tools.coverage@tools-bastion-02:~/tool-coverage$ python chart.py 
Traceback (most recent call last):
  File "/usr/lib/python3.4/tkinter/__init__.py", line 39, in <module>
    import _tkinter
ImportError: No module named '_tkinter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "chart.py", line 20, in <module>
    import matplotlib.pyplot as plot
  File "/mnt/nfs/labstore-secondary-tools-project/coverage/tool-coverage/venv/lib/python3.4/site-packages/matplotlib/pyplot.py", line 113, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/mnt/nfs/labstore-secondary-tools-project/coverage/tool-coverage/venv/lib/python3.4/site-packages/matplotlib/backends/__init__.py", line 60, in pylab_setup
    [backend_name], 0)
  File "/mnt/nfs/labstore-secondary-tools-project/coverage/tool-coverage/venv/lib/python3.4/site-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module>
    from six.moves import tkinter as Tk
  File "/mnt/nfs/labstore-secondary-tools-project/coverage/tool-coverage/venv/lib/python3.4/site-packages/six.py", line 92, in __get__
    result = self._resolve()
  File "/mnt/nfs/labstore-secondary-tools-project/coverage/tool-coverage/venv/lib/python3.4/site-packages/six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "/mnt/nfs/labstore-secondary-tools-project/coverage/tool-coverage/venv/lib/python3.4/site-packages/six.py", line 82, in _import_module
    __import__(name)
  File "/usr/lib/python3.4/tkinter/__init__.py", line 41, in <module>
    raise ImportError(str(msg) + ', please install the python3-tk package')
ImportError: No module named '_tkinter', please install the python3-tk package

I'm not aware of any way to pip install tkinter, I think it needs to be installed via the package - correct me if I'm wrong please :)

Event Timeline

Legoktm triaged this task as Normal priority.Dec 11 2017, 8:15 AM
Legoktm created this task.
Legoktm lowered the priority of this task from Normal to Low.Dec 11 2017, 8:22 AM

Change 409226 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/puppet@production] toolforge: add user requested packages

https://gerrit.wikimedia.org/r/409226

bd808 claimed this task.Feb 9 2018, 7:04 AM

Change 409226 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] toolforge: add user requested packages

https://gerrit.wikimedia.org/r/409226

bd808 closed this task as Resolved.Feb 11 2018, 10:44 PM