首页 > 解决方案 > 构建失败:我的代码在 Readthedocs 中的代码错误

问题描述

我正在尝试将我的 Sphinx 文档与 Readthedocs 链接起来。我可以在我的计算机中本地构建文档,但是当我尝试让 Readthedocs 自动生成文档时,我收到以下错误:

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/helstrom-quantum-centroid-classifier/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 368, in eval_config_file
    execfile_(filename, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/helstrom-quantum-centroid-classifier/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/helstrom-quantum-centroid-classifier/checkouts/latest/docs/conf.py", line 16, in <module>
    import sphinx_gallery
ModuleNotFoundError: No module named 'sphinx_gallery'

我在我的 conf.py 文件中导入了 sphinx_gallery,并添加了扩展名“sphinx_gallery.gen_gallery”。我的 conf.py 文件位于: https ://github.com/leockl/helstrom-quantum-centroid-classifier/blob/master/docs/conf.py

我的 Github 项目位于: https ://github.com/leockl/helstrom-quantum-centroid-classifier

我哪里出错了?

标签: pythonpython-sphinxread-the-docs

解决方案


推荐阅读