matplotlib / matplotlib/ipympl
%matplotlib widget run time error
Personne n'a encore pris cette issue.
- Langage dominant
- Jupyter Notebook
- Étoiles
- 1.7k
- Forks
- 234
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commence par reproduire %matplotlib widget dans l’environnement indiqué avec Linux, Python 3.12.4 et VS Code, puis examine le chemin de résolution du backend affiché dans matplotlib/backends/registry.py. Compare le comportement avec la configuration de l’intégration d’ipympl et de Jupyter ; le travail est terminé lorsque la cause et une résolution reproductible pour cette configuration ont été identifiées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- jupyter-notebook, matplotlib, python, vscode
- Domaine
- frontend, tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100