问题
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:
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
回答1:
RTD needs to install nbsphinx
. To tell RTD to install packages, you must:
- 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. - Create
requirements.txt
in your repo and addnbsphinx
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.
来源:https://stackoverflow.com/questions/46994842/using-readthedocs-to-host-sphinx-docs-created-with-jupyter