使用 ReadTheDocs 托管使用 Jupyter 创建的 Sphinx 文档
Using ReadTheDocs to host Sphinx Docs created with Jupyter
我使用 github 存储库和使用 sphinx 和 readthedocs 主题呈现的 Jupyter 笔记本的 ReadTheDocs 构建仍然失败。我能够在本地呈现这些内容,但是当我尝试使用 RTD 时,我收到以下失败消息:
我尝试将 nbsphinx.py 文件放入存储库,但仍然失败。 Link 到 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
并能够成功构建您的文档,或者至少继续进行下一次失败(如果有的话)。
我使用 github 存储库和使用 sphinx 和 readthedocs 主题呈现的 Jupyter 笔记本的 ReadTheDocs 构建仍然失败。我能够在本地呈现这些内容,但是当我尝试使用 RTD 时,我收到以下失败消息:
我尝试将 nbsphinx.py 文件放入存储库,但仍然失败。 Link 到 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
并能够成功构建您的文档,或者至少继续进行下一次失败(如果有的话)。