matplotlib / matplotlib/ipympl
%matplotlib widget run time error
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 1.7k
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hello,
I saw an old issue about this topic, but I could not find a recent solution.
I am using a Linux machine, Python version 3.12.4. I created my environment and I installed matplotlib by using
pip install matplotlib
But when I run my code in VS code, I get a runtime error related to %matplotlib widget
RuntimeError Traceback (most recent call last)
File ~/.conda/envs/s_i/lib/python3.12/site-packages/matplotlib/backends/registry.py:413, in BackendRegistry.resolve_gui_or_backend(self, gui_or_backend)
412 try:
--> 413 return self.resolve_backend(gui_or_backend)
414 except Exception: # KeyError ?File ~/.conda/envs/s_i/lib/python3.12/site-packages/matplotlib/backends/registry.py:375, in BackendRegistry.resolve_backend(self, backend)
374 if gui is None:
--> 375 raise RuntimeError(f"'{backend}' is not a recognised backend name")
377 return backend, gui if gui != "headless" else NoneRuntimeError: 'widget' is not a recognised backend name
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
Cell In[3], line 8
3 from pathlib import Path
5 #import ephyviewer
6 #import spikeinterface_gui as sigui
----> 8 get_ipython().run_line_magic('matplotlib', 'widget')
9 get_ipython().run_line_magic('matplotlib', 'inline')
10 #%matplotlib notebook
...
414 except Exception: # KeyError ?
--> 415 raise RuntimeError(
416 f"'{gui_or_backend} is not a recognised GUI loop or backend name")RuntimeError: 'widget is not a recognised GUI loop or backend name
Have you found a solution for this issue?
thank you
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza reproduciendo %matplotlib widget en el entorno indicado de Linux, Python 3.12.4 y VS Code, y luego inspecciona la ruta de resolución del backend que se muestra en matplotlib/backends/registry.py. Compara el comportamiento con la configuración de integración de ipympl y Jupyter; se considera terminado cuando se hayan identificado la causa y una resolución reproducible para esta configuración.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- jupyter-notebook, matplotlib, python, vscode
- Área
- frontend, tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100