Search code examples
jupyterpython-sphinxread-the-docs

Using ReadTheDocs to host Sphinx Docs created with Jupyter


I continue to have failed builds with ReadTheDocs using a github repository with Jupyter notebooks rendered using sphinx and the readthedocs theme. I am able to render these locally, however when I try with RTD, I get the following fail message:

enter image description here

I tried placing the nbsphinx.py file in the repository but things still fail. Link to RTD is here:

https://readthedocs.org/projects/calculus-notes/

Github repo is here:

https://github.com/jfkoehler/calc_docs


Solution

  • RTD needs to install nbsphinx. To tell RTD to install packages, you must:

    1. From RTD FAQ, My project isn’t building with autodoc:

      enable the virtualenv feature in the Admin page of your project, which will install your project into a virtualenv, and allow you to specify a requirements.txt file for your project.

    2. Create requirements.txt in your repo and add nbsphinx to its contents. See https://github.com/spatialaudio/nbsphinx/blob/0.2.14/doc/requirements.txt#L2

    After you commit and push item 2 to your repo, then RTD should install nbsphinx and be able to build your docs successfully, or at least proceed to the next failure if there is one.