cdanielmachado / carveme

CarveMe: genome-scale metabolic model reconstruction
Other
149 stars 51 forks source link

ImportError: No module named _tkinter #45

Closed lavik17 closed 5 years ago

lavik17 commented 5 years ago

I've installed CPLEX, CPLEX python api, and diamond. I've then installed carveme using pip.

When running carveme on a single genome I get the following error:

Traceback (most recent call last):
  File "/home/adilavy/.linuxbrew/bin/carve", line 4, in <module>
   from carveme import config, project_dir
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/carveme/__init__.py", line 5, in <module>
    from framed import set_default_solver, set_default_parameter, Parameter
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/framed/__init__.py", line 6, in <module>
    from .cobra.phaseplane import PhPP
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/framed/cobra/phaseplane.py", line 16, in <module>
    import matplotlib.pyplot as plt
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/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/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
    [backend_name], 0)
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/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/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/matplotlib/backends/tkagg.py", line 5, in <module>
    from six.moves import tkinter as Tk
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/six.py", line 203, in load_module
    mod = mod._resolve()
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/site-packages/six.py", line 82, in _import_module
    __import__(name)
  File "/home/adilavy/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
lavik17 commented 5 years ago

Solved after using export MPLBACKEND="agg"