【问题标题】:Using ReadTheDocs to host Sphinx Docs created with Jupyter使用 ReadTheDocs 托管使用 Jupyter 创建的 Sphinx Docs
【发布时间】:2017-10-28 21:51:12
【问题描述】:

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

我尝试将 nbsphinx.py 文件放在存储库中,但仍然失败。 RTD 的链接在这里:

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

Github 仓库在这里:

https://github.com/jfkoehler/calc_docs

【问题讨论】:

    标签: jupyter python-sphinx read-the-docs


    【解决方案1】:

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

    1. 来自RTD FAQ, My project isn’t building with autodoc

      在您的项目的管理页面中启用 virtualenv 功能,这会将您的项目安装到一个 virtualenv 中,并允许您为您的项目指定一个 requirements.txt 文件。

    2. 在您的存储库中创建requirements.txt 并将nbsphinx 添加到其内容中。见https://github.com/spatialaudio/nbsphinx/blob/0.2.14/doc/requirements.txt#L2

    在您提交项目 2 并将其推送到您的存储库后,RTD 应该安装 nbsphinx 并能够成功构建您的文档,或者至少继续下一次失败(如果有的话)。

    【讨论】:

    • 完美!非常感谢。
    猜你喜欢
    • 2016-11-02
    • 2022-07-18
    • 2018-06-26
    • 2018-06-18
    • 1970-01-01
    • 1970-01-01
    • 2013-05-13
    • 2022-06-30
    • 2020-08-01
    相关资源
    最近更新 更多