如何解决Sphinx无法找到conf.py,但是它在那里
(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. (...)
因此,如果您要从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__
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。