1
resposta

%matplotlib inline não funciona


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-5-e9cc5ba597db> in <module>
----> 1 get_ipython().run_line_magic('matplotlib', 'inline')
      2 get_ipython().run_line_magic('matplotlib', 'inline')
      3 import pandas as pd
      4 import matplotlib.pyplot as plt
      5 plt.rc('figure', figsize = (14, 6))

/Users/anaconda3/envs/Projetos_python/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
   2315                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2316             with self.builtin_trap:
-> 2317                 result = fn(*args, **kwargs)
   2318             return result
   2319 

<decorator-gen-108> in matplotlib(self, line)

/Users/anaconda3/envs/Projetos_python/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(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):

/Users/anaconda3/envs/Projetos_python/lib/python3.7/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.lower() if isinstance(args.gui, str) else args.gui)
    100             self._show_matplotlib_backend(args.gui, backend)
    101 

/Users/anaconda3/envs/Projetos_python/lib/python3.7/site-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
   3405         """
   3406         from IPython.core import pylabtools as pt
-> 3407         gui, backend = pt.find_gui_and_backend(gui, self.pylab_gui_select)
   3408 
   3409         if gui != 'inline':

/Users/anaconda3/envs/Projetos_python/lib/python3.7/site-packages/IPython/core/pylabtools.py in find_gui_and_backend(gui, gui_select)
    278     """
    279 
--> 280     import matplotlib
    281 
    282     if gui and gui != 'auto':

ModuleNotFoundError: No module named 'matplotlib'
1 resposta

Olá Thays tudo certinho por aí??

Vou te pedir para olhar esse POST que possui duas soluções.

Um ponto de atenção é verificar se você está no ambiente correto. Para isso, execute esses comandos diretamente no seu Jupyter por favor, um de cada vez:

!conda info --envs
!conda list

Passe as saídas e a gente verifica se você está no ambiente que imagina e efetuaremos a instalação no caminho correto.

Caso não atenda, fico te aguardando aqui e aí prosseguimos para outras possibilidades tá bom? =)