Python:没有名为 sphinx 错误的模块

标签 python pip python-sphinx

我已经关注了 guide .

$ pip install sphinx sphinx-autobuild
$ pip freeze | grep "sphinx"
sphinx-autobuild==0.6.0
sphinxcontrib-websupport==1.0.0

$ cd docs
$ sphinx-quickstart
$ make html

make html 给出以下错误:

/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named sphinx
make: *** [help] Error 1

[问]如何防止此错误发生?

感谢您宝贵的时间和帮助。

最佳答案

我遇到了同样的问题,我认为分享我找到的解决方案可能会有所帮助。

打开 Makefile 文件,并更改以下行:

SPHINXBUILD = python -msphinx

给这个:

SPHINXBUILD = python3 -msphinx

关于Python:没有名为 sphinx 错误的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43694823/

相关文章:

python - 无法在 Ubuntu Linux 中使用 pip 安装 Python 包 : InsecurePlatformWarning, SSLError,tlsv1 警报协议(protocol)版本

python - 从虚拟环境中在 PyCharm 中注册 VCS 根?

python-asyncio - 使用 Sphinx autodoc 记录 Python 协程

Python相当于 map 列表?

python - 如何通过另一个 Dataframe 列过滤 Pandas 行?

python - SQLAlchemy 不会级联删除多个级别

python - matplotlib:将图例符号放在标签的右侧

python - 使用 pip 升级最初通过 apt 安装的包

python - 如何使用 intersphinx 正确链接到 PyQt5 文档?

python-sphinx - 我如何使用 sphinx 拥有多个版本的文档?