Chilipp / sphinx-nbexamples

⛔️ Deprecated: Create an examples gallery with sphinx from Jupyter Notebooks
MIT License
15 stars 11 forks source link

exception: No such kernel named bash #17

Closed erwanp closed 3 years ago

erwanp commented 3 years ago

Hello !

Thank you for this library. I'm trying to generate a .html homepage for a JupyterLab project based on Notebook examples and I think I can achieve that with sphinx-nbexamples.

However so far i'm still struggling in making the library work.

I tried locally by cloning your project and running a make html in /docs.

I end up with the following "no such kernel named bash" both on Windows & Linux (Ubuntu 18x).

$ make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v3.2.0
C:\Users\erwan\Anaconda3\lib\site-packages\sphinx_nbexamples\__init__.py:1165: RemovedInSphinx40Warning: The app.add_stylesheet() is deprecated. Please use app.add_css_file() instead.
  app.add_stylesheet('example_gallery_styles.css')
making output directory... done
WARNING: html_static_path entry '_static' does not exist
WARNING: The config value `not_document_data' has type `str', defaults to `list'.
loading intersphinx inventory from http://www.sphinx-doc.org/en/stable/objects.inv...
loading intersphinx inventory from http://sphinx-nbexamples.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from http://psyplot.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://nbconvert.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://docs.python.org/3.4/objects.inv...
intersphinx inventory has moved: http://psyplot.readthedocs.io/en/latest/objects.inv -> https://psyplot.readthedocs.io/en/latest/objects.inv
intersphinx inventory has moved: http://sphinx-nbexamples.readthedocs.io/en/latest/objects.inv -> https://sphinx-nbexamples.readthedocs.io/en/latest/objects.inv
intersphinx inventory has moved: http://www.sphinx-doc.org/en/stable/objects.inv -> https://www.sphinx-doc.org/en/master/objects.inv
C:\Users\erwan\Anaconda3\lib\site-packages\sphinx_nbexamples\__init__.py:950: RemovedInSphinx40Warning: The app.add_stylesheet() is deprecated. Please use app.add_css_file() instead.
  version=insert_bokeh))
C:\Users\erwan\Anaconda3\lib\site-packages\sphinx_nbexamples\__init__.py:952: RemovedInSphinx40Warning: The app.add_javascript() is deprecated. Please use app.add_js_file() instead.
  NotebookProcessor.BOKEH_JS.format(version=insert_bokeh))
Processing ../examples\example_bash.ipynb

Extension error:
Handler <bound method Gallery.from_sphinx of <class 'sphinx_nbexamples.Gallery'>> for event 'builder-inited' threw an exception (exception: No such kernel named bash)
make: *** [Makefile:55: html] Error 2

--

Eventually I could fix this by running your postBuild, failing on bash_kernel not installed, and installing bash_kernel manually.

Shouldn't this be in the requirements.txt ? (talking about this, I also had to install 2 other dependencies , sphinx_rtd_theme and autodocsumm) which may be needed only to run your examples, but could also be added in the requirements.txt? )

Chilipp commented 3 years ago

hey @erwanp! My honest apologies for getting back to you so late! I saw that you also contacted me on gitter, sorry. the bash_kernel is in the requirements for the docs (https://github.com/Chilipp/sphinx-nbexamples/blob/master/docs/requirements.txt). But I actually recommend to use nbsphinx instead of this package when you are starting something new. they also have the possibility to build an example gallery.

I will soon move my documentations to this framework and decpreceate sphinx-nbexamples

erwanp commented 3 years ago

Hello @Chilipp , thank you for your answer !

I'll try to set-up nbsphinx as you suggest.

i already got the standard sphinx-gallery working (https://github.com/radis/radis/pull/205), I hope it's quite easy from there.

Chilipp commented 3 years ago

closing this as sphinx-nbexamples is now archived.