AnswerDotAI / AnswerDotAI/nbdev

matplotlib_inline dependency missing in nbdev_test

Offen
#1,297 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Jupyter Notebook
Sterne
5.3k
Forks
513
Ø Merge
2 T. 30 Min.
Gemergte PRs (30 T.)
8

Beschreibung

# matplotlib_inline dependency missing

After migrating to nbdev2, running `nbdev_test` on my Jupyter notebooks with `matplotlib` plots produced the following error:

ModuleNotFoundError: No module named 'matplotlib_inline'

This error only occurs when running `nbdev`_test or `nbdev_prepare`. The notebooks render fine. After some searching online I found that there is a separate python package on pypi: `matplotlib-inline`. See: https://pypi.org/project/matplotlib-inline/

The documentation says: *Note that in current versions of JupyterLab and Jupyter Notebook, the explicit use of the %matplotlib inline directive is not needed anymore, though other third-party clients may still require it.*

After `pip install matplotlib-inline` the error no longer occurred.

Would it be possible to add this requirement to nbdev? It seems to me that this would prevent similar problems with other users.

Thanks,

Frank

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die von nbdev_test und nbdev_prepare verwendeten Abhängigkeitsmetadaten zu lokalisieren, und reproduziere dann den ModuleNotFoundError mit einem Notebook, das einen matplotlib-Plot enthält. Das Issue ist abgeschlossen, wenn die Installation von nbdev matplotlib-inline bereitstellt und beide Einstiegspunkte ohne diesen Fehler wegen eines fehlenden Moduls ausgeführt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
jupyter-notebook, matplotlib, python
Bereich
testing, tooling
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.