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

Sphinx can't locate conf.py but it is there

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

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

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

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

我不知道我错过了什么。

sphinx-build 的签名是:

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

注意conf.py的发现规则:

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

因此,如果您从 /docs 文件夹(在您的例子中名为 /documentation)执行 sphinx-build,您将写:

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__