fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.93k stars 488 forks source link

matplotlib_inline dependency missing in nbdev_test #1297

Open fligt opened 1 year ago

fligt commented 1 year ago

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

deven-gqc commented 1 year ago

You can add that requirement inside settings.ini in the requirements key.