plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Título: Problemas de Renderização com o Pacote Plotly

Open guilherm707070 opened this issue 2 years ago • 1 comments

Título: Problemas de Renderização com o Pacote Plotly

Olá,

Estou enfrentando alguns problemas ao tentar usar o pacote plotly para a renderização de gráficos. Ao tentar exibir os gráficos usando o método show(), estou recebendo o seguinte erro:

python Copiar ValueError: Mime type rendering requires nbformat>=4.2.0 but it is not installed Além disso, estou tendo dificuldades para entender como resolver esse problema e gostaria de obter assistência da comunidade.

Detalhes do Ambiente:

Estou usando o pacote plotly na versão mais atualizada Meu ambiente de desenvolvimento é o vscode Já tentei instalar a versão correta do pacote nbformat (>=4.2.0) e atualizar o pacote plotly, mas o problema persiste. Mensagens de Erro Adicionais:

[ ValueError Traceback (most recent call last) Cell In[35], line 7 5 grafico = px.histogram (tabela, x= "cancelou") 6 #visualiza o grafico ----> 7 grafico.show()

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\plotly\basedatatypes.py:3410, in BaseFigure.show(self, *args, **kwargs) 3377 """ 3378 Show a figure using either the default renderer(s) or the renderer(s) 3379 specified by the renderer argument (...) 3406 None 3407 """ 3408 import plotly.io as pio -> 3410 return pio.show(self, *args, **kwargs)

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\plotly\io_renderers.py:394, in show(fig, renderer, validate, **kwargs) 389 raise ValueError( 390 "Mime type rendering requires ipython but it is not installed" 391 ) 393 if not nbformat or Version(nbformat.version) < Version("4.2.0"): --> 394 raise ValueError( 395 "Mime type rendering requires nbformat>=4.2.0 but it is not installed" 396 ) 398 ipython_display.display(bundle, raw=True) 400 # external renderers

ValueError: Mime type rendering requires nbformat>=4.2.0 but it is not installed

]. Agradeço antecipadamente por qualquer ajuda ou orientação que você possa oferecer.

Atenciosamente, [guilherme ]

guilherm707070 avatar Jan 15 '24 01:01 guilherm707070

https://stackoverflow.com/questions/66557543/valueerror-mime-type-rendering-requires-nbformat-4-2-0-but-it-is-not-installed

Irmão, olha essas soluções no Stack Overflow. Eu testei quase todas, fiz os comandos: pip install ipykernel pip install --upgrade nbformat Reiniciei o vs code, rodei tudo e deu certo. Testa e avisa aí

lucas-dos-santos-gomes avatar Jan 24 '24 15:01 lucas-dos-santos-gomes

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

gvwilson avatar Jul 11 '24 22:07 gvwilson