python - 找不到 'sphinx-build' 命令。

标签 python windows-10 python-sphinx chocolatey

这是我们安装 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/

相关文章:

html - 如何更改警告警告的格式或在 Sphinx HTML 输出中添加警告

python - 在 Sphinx 文档中包含文档字符串

python - sphinx.ext.autodoc : Keeping names of constants in signature

python - Django 帖子中的 "read more"

windows-10 - 为什么我无法启动我刚刚使用 VirtualBox 构建的虚拟机?

javascript - 使用事件将玩家信息从客户端发送到服务器(minecraft bedrock API)

c# - 是否可以编写一个在 Windows Mobile 6.5 和 Windows Embedded 8.1/10 Handheld 上运行的应用程序?

python - 使用 Selenium 每天下载不同的文件

python - 具有列表值的 Pandas 数据框列

Python,识别循环中的文件给出错误: setting an array element with a squence