1
resposta

Erro no plt.show()

Olá pessoal, boa tarde
Fui rodar o comando plt.show() e apresentou as mensagens de erro abaixo

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

/tmp/ipython-input-2122436968.py in <cell line: 0>()
----> 1 plt.show()

17 frames

/usr/local/lib/python3.12/dist-packages/matplotlib_inline/backend_inline.py in _enable_matplotlib_integration()
    216         backend = matplotlib.get_backend(auto_select=False)
    217     else:
--> 218         backend = matplotlib.rcParams._get("backend")
    219 
    220     if ip and backend in ("inline", "module://matplotlib_inline.backend_inline"):

AttributeError: 'RcParams' object has no attribute '_get'
1 resposta

Oi Ana! Tudo bem?

Atualmente, ao executar o código plt.show(), aparece este erro que é devido a problemas de versão. Para corrigir, atualize a versão do Matplotlib, substituindo:

esse código:

!pip install matplotlib==3.6.2 

por

!pip install -U matplotlib

Em seguida reinicie a sessão e execute o código novamente.

Espero ter ajudado e qualquer dúvida, compartilhe no fórum.

Até mais!

Caso este post tenha lhe ajudado, por favor, marcar como solucionado!