gpt4 book ai didi

python - Sphinx 找不到 conf.py 但它在那里

转载 作者:行者123 更新时间:2023-12-05 03:47:47 25 4
gpt4 key购买 nike

我正在尝试执行 sphinx-build,但出现此错误:

(AttractoraVenv) stw041269:AttractoraProject hugovillalobos$  sphinx-build -b html source build

Application error:
config directory doesn't contain a conf.py file (source)

但是,如您所见,文件就在那里:

file tree

我不知道我错过了什么。

最佳答案

sphinx-build 的签名是:

sphinx-build [options] <sourcedir> <outputdir> [filenames …]

注意 conf.py 的发现规则:

sphinx-build looks for <sourcedir>/conf.py for the configuration settings. (...)

所以如果你正在执行 sphinx-build来自 /docs文件夹(在你的例子中命名为 /documentation)你会写:

sphinx-build -E -b html -d build/doctrees source build/html

C:.
├───docs <<-- Execute sphinx-build from this directory!!
│ │
│ ├───build
│ │ ├───doctrees
│ │ └───html
│ │ ├───_sources
│ │ └───_static
│ │
│ └───source
│ ├───_static
│ └───_templates

└───your_package
└───__init__

关于python - Sphinx 找不到 conf.py 但它在那里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64742439/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com