-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%matplotlib magic command - gives ModuleNotFoundError #86
Comments
Ah, it looks like we need to install That said, I don't know how well any of the other MPL backends will work in Colab -- what are you trying to do? 😀 |
the only type of matplotlib backend that is supported is anything else can't possibly work with remote runtimes since it requires x-forwarding |
Now, that Ipywidgets support has been added to colab is this issue solved? I still can't create interactive plots in colab with |
At a glance, From jupyterlab/jupyterlab#2948 it looks like JupyterLab is now requiring |
The basic magic command
%matplotlib
reports an error
%matplotlib interactive also reports an error
ModuleNotFoundError Traceback (most recent call last)
/usr/lib/python3.6/tkinter/init.py in ()
36 try:
---> 37 import _tkinter
38 except ImportError as msg:
ModuleNotFoundError: No module named '_tkinter'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
in ()
----> 1 get_ipython().magic('matplotlib')
/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py in magic(self, arg_s)
2158 magic_name, _, magic_arg_s = arg_s.partition(' ')
2159 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2160 return self.run_line_magic(magic_name, magic_arg_s)
2161
2162 #-------------------------------------------------------------------------
/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
2079 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2080 with self.builtin_trap:
-> 2081 result = fn(*args,**kwargs)
2082 return result
2083
in matplotlib(self, line)
/usr/local/lib/python3.6/dist-packages/IPython/core/magic.py in (f, *a, **k)
186 # but it's overkill for just that one bit of state.
187 def magic_deco(arg):
--> 188 call = lambda f, *a, **k: f(*a, **k)
189
190 if callable(arg):
/usr/local/lib/python3.6/dist-packages/IPython/core/magics/pylab.py in matplotlib(self, line)
98 print("Available matplotlib backends: %s" % backends_list)
99 else:
--> 100 gui, backend = self.shell.enable_matplotlib(args.gui)
101 self._show_matplotlib_backend(args.gui, backend)
102
/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
2948 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
2949
-> 2950 pt.activate_matplotlib(backend)
2951 pt.configure_inline_support(self, backend)
2952
/usr/local/lib/python3.6/dist-packages/IPython/core/pylabtools.py in activate_matplotlib(backend)
307
308 import matplotlib.pyplot
--> 309 matplotlib.pyplot.switch_backend(backend)
310
311 # This must be imported last in the matplotlib series, after
The text was updated successfully, but these errors were encountered: