这是我们安装 Sphinx 的过程。
> choco install python -y -f
> pip install sphinx
我们知道 sphinx 安装是因为以下输出。
> pip show sphinx
---
Metadata-Version: 2.0
Name: Sphinx
Version: 1.4.3
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: c:\programdata\chocolatey\lib\python3\tools\lib\site-packages
我们还将其安装位置添加到我们的 PATH 中。
c:\programdata\chocolatey\lib\python3\tools\lib\site-packages
即便如此,运行 sphinx-build
也不起作用。
'sphinx-build' is not recognized as an internal or external command,
operable program or batch file.
最佳答案
我在使用 pip
安装 Sphinx 时也遇到了这个问题。使用official documentation提出的安装方式解决了问题。 :
对于 Python 3:
$ apt-get install python3-sphinx
对于 Python 2:
$ apt-get install python-sphinx
关于python - 找不到 'sphinx-build' 命令。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37757151/