无法识别Sphinx-build为内部或外部命令

4 投票
1 回答
7994 浏览
提问于 2025-04-17 03:59

在Python 2.5上,我通过easy_install安装了sphinx,它在Windows 7上的位置如下:

C:\Python25\Lib\site-packages\sphinx-1.0.8-py2.5.egg\sphinx

我想把几个.rst文件转换成HTML格式。但是每次我运行sphinx-build的时候,都会遇到以下错误:

'sphinx-build' is not recognized as an internal or external command,
operable program or batch file.

我是不是漏掉了什么?

1 个回答

7

sphinx-build这个命令应该安装在C:\Python25\Scripts这个文件夹里。你可以直接使用完整的路径C:\Python25\Scripts\sphinx-build来运行这个命令,或者把这个文件夹添加到你的PATH环境变量中,这样就可以直接输入sphinx-build来调用它了。

撰写回答