2

我正在尝试使用 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 并且从未遇到过这个问题,所以我有点不知所措。有什么想法吗?

4

1 回答 1

1

正如@Blender 在评论中所说。make没有安装。我最近不得不重新安装 Xcode,忘记重新安装命令行工具

为了澄清起见,我正在运行 OSX 10.8.5。

要使用make第一次安装,然后打开 Xcode 并通过导航到以下位置下载/Xcode安装:app storeCommand Line ToolsXcode->Preferences->Downloads

于 2013-12-28T01:29:14.137 回答