我正在尝试使用 Sphinx 来记录我一直在研究的 Python 库。在此过程中,我一直在使用这篇文章作为粗略指南。但是,我在让 Sphinx 正常工作时遇到了问题。
一旦一切都设置好了,Sphinx 就已经安装好了,我已经在我从项目根目录输入的代码中添加了文档:
sphinx-apidoc -F -o docs/ mypackage/
输出:
Creating file docs/mypackage.rst.
Creating file docs/mypackage.helpers.rst.
Creating file docs/conf.py.
Creating file docs/index.rst.
Creating file docs/Makefile.
Creating file docs/make.bat.
接下来,我分别编辑 docs/conf.py 以确保我的 sys.path.insert(0, os.path.abspath('/Users//path/to/mypackage')) 是正确的。
但是,当我尝试通过以下方式构建文档(从 docs 目录中)时:
build html
我受到了欢迎:
-bash: make: command not found
我已经使用 sphinx-apidoc 并与其他库一起制作 html 并且从未遇到过这个问题,所以我有点不知所措。有什么想法吗?