我仍然使用 github 存储库和使用 sphinx 和 readthedocs 主题渲染的 Jupyter 笔记本进行 ReadTheDocs 构建失败。我能够在本地渲染这些,但是当我尝试使用 RTD 时,我收到以下失败消息:
我尝试将 nbsphinx.py 文件放入存储库中,但仍然失败。 RTD 链接如下:
https://readthedocs.org/projects/calculus-notes/
Github 存储库在这里:
最佳答案
RTD 需要安装 nbsphinx
。要告诉 RTD 安装软件包,您必须:
- 来自 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. - 在您的存储库中创建
requirements.txt
并将nbsphinx
添加到其内容中。请参阅https://github.com/spatialaudio/nbsphinx/blob/0.2.14/doc/requirements.txt#L2
在您提交第 2 项并将其推送到您的存储库后,RTD 应该安装 nbsphinx
并能够成功构建您的文档,或者至少继续处理下一个失败(如果有)。
关于jupyter - 使用 ReadTheDocs 托管使用 Jupyter 创建的 Sphinx 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46994842/