jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.72k stars 565 forks source link

nbsphinx 0.5.1 does not provide the extra 'execute' #1212

Open dHannasch opened 4 years ago

dHannasch commented 4 years ago

https://nbsphinx.readthedocs.io/en/0.5.1/installation.html does not mention that pip install nbsphinx[execute] is necessary to execute notebooks.

I don't have a suggested update to the documentation, because I'm not actually sure that pip install nbsphinx[execute] is the correct way to do it. I'm just guessing from https://github.com/jupyter/nbconvert/blob/5.x/setup.py#L217 (and from #553). When I actually try to pip install nbsphinx[execute], it does not recognize the [execute] and therefore does not install jupyter_client. (So Sphinx will crash when attempting to execute a notebook.)

(Somewhat related to #556.)

Can you list steps to reproduce this issue?

Pull the docker image dahanna/python:3.7-pandoc-alpine (it's just a Docker image that has zmq and pandoc installed, presumably any other image will work the same) and pip install nbsphinx[execute].

Pulling docker image dahanna/python:3.7-pandoc-alpine ...
 Collecting nbsphinx[execute]
  Downloading nbsphinx-0.5.1-py2.py3-none-any.whl (21 kB)
  WARNING: nbsphinx 0.5.1 does not provide the extra 'execute'

(This can obviously be worked around by manually pip installing jupyter_client.)

Nbconvert version: 0.5.1

mgeier commented 4 years ago

Please note that nbsphinx and nbconvert are different packages.

The package nbconvert does have an "extra" option [execute], while nbsphinx doesn't (at least not yet?).

If you think nbsphinx should have such an "extra" option, please create an issue or pull request there: https://github.com/spatialaudio/nbsphinx

Regarding documentation, this is the relevant section: https://nbsphinx.readthedocs.io/en/0.5.1/installation.html#Jupyter-Kernel

If your notebooks happen to use Python, you should install a Python kernel, e.g. by installing the package ipykernel. If you don't want nbsphinx to execute your notebooks (e.g. using nbsphinx_execute = 'never'), you don't need that.