我正在尝试执行sphinx-build
,但出现此错误:
(AttractoraVenv) stw041269:AttractoraProject hugovillalobos$ sphinx-build -b html source build
Application error:
config directory doesn't contain a conf.py file (source)
但是,正如您所看到的,文件就在那里:
我不知道自己在想什么。
答案 0 :(得分:0)
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__