jupyter - 使用 ReadTheDocs 托管使用 Jupyter 创建的 Sphinx 文档

标签 jupyter python-sphinx read-the-docs

我仍然使用 github 存储库和使用 sphinx 和 readthedocs 主题渲染的 Jupyter 笔记本进行 ReadTheDocs 构建失败。我能够在本地渲染这些,但是当我尝试使用 RTD 时,我收到以下失败消息:

enter image description here

我尝试将 nbsphinx.py 文件放入存储库中,但仍然失败。 RTD 链接如下:

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

Github 存储库在这里:

https://github.com/jfkoehler/calc_docs

最佳答案

RTD 需要安装 nbsphinx。要告诉 RTD 安装软件包,您必须:

  1. 来自 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. 在您的存储库中创建 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/

相关文章:

ipython - 无法在 Windows 上使用 Anaconda 转换 ipython 笔记本

python-2.7 - 使用 Python 2 和 3 安装附加包 Jupyter

pycharm - 未知指令类型 "toctree"。 Pycharm 中的错误,但 index.html 有效

python-sphinx - 突出显示部分代码块

python - autodoc 和明确指定的实例属性的问题

python - 阅读不包括主题 css 的文档

python-2.7 - 狮身人面像 : Linking to Embedded Binary Files (PDFs)

python - 如何在 jupyterlab 中更改内核的 Logo 图像

Github 上 Jupyter notebook 中的 HTML anchor

python - 由于内存消耗,要求 PsychoPy 无法构建 readthedocs