import matplotlib and %matplotlib inline are not working. Getting the following errors.
On the anaconda prompt I ran this command as well.
conda install matplotlib
Even after this, this did not work.
Just observed a strange thing.
When I launched using the command jupyter lab from the anaconda prompt, microsoft edge browser launched. And in that this works fine. But when I opened in chrome browser, this gives the problem.
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-0484cd13f94d> in <module>()
----> 1 import matplotlib
ModuleNotFoundError: No module named 'matplotlib'
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-9e3324102725> in <module>()
----> 1 get_ipython().run_line_magic('matplotlib', 'inline')
~\AppData\Local\conda\conda\envs\scipy18jlab\lib\site-
packages\IPython\core\interactiveshell.py in run_line_magic(self,
magic_name, line, _stack_depth)
2129 kwargs['local_ns'] =
sys._getframe(stack_depth).f_locals
2130 with self.builtin_trap:
-> 2131 result = fn(*args,**kwargs)
2132 return result
2133
<decorator-gen-108> in matplotlib(self, line)
~\AppData\Local\conda\conda\envs\scipy18jlab\lib\site-
packages\IPython\core\magic.py in (f, *a, **k) 185 # but it's overkill for just that one bit of state. 186 def magic_deco(arg): --> 187 call = lambda f, *a, **k: f(*a, **k) 188 189 if callable(arg):
~\AppData\Local\conda\conda\envs\scipy18jlab\lib\site-
packages\IPython\core\magics\pylab.py in matplotlib(self, line) 97 print("Available matplotlib backends: %s" % backends_list) 98 else: ---> 99 gui, backend = self.shell.enable_matplotlib(args.gui) 100 self._show_matplotlib_backend(args.gui, backend) 101
~\AppData\Local\conda\conda\envs\scipy18jlab\lib\site-
packages\IPython\core\interactiveshell.py in enable_matplotlib(self, gui)
3035 """
3036 from IPython.core import pylabtools as pt
-> 3037 gui, backend = pt.find_gui_and_backend(gui,
self.pylab_gui_select)
3038
3039 if gui != 'inline':
~\AppData\Local\conda\conda\envs\scipy18jlab\lib\site-
packages\IPython\core\pylabtools.py in find_gui_and_backend(gui,
gui_select)
271 """
272
--> 273 import matplotlib
274
275 if gui and gui != 'auto':
ModuleNotFoundError: No module named 'matplotlib'

