我在Centos机器上安装了狮身人面像,它显示它已经安装了最新的斯芬克斯版本,是4.3.0,但是当运行“斯芬克斯-快速启动”或者检查“斯芬克斯-构建--版本”时,它显示的是1.1.3版本。
它显示出版本不匹配。请让我知道如何解决这个问题,并消除版本错配。
原木-
[<...> docs]$ sphinx-build --version
Sphinx v1.1.3
[<...> docs]$ pip show sphinx
Name: Sphinx
Version: 4.3.1
Summary: Python documentation generator
Home-page: https://www.sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: </.../>.local/lib/python3.6/site-packages
Requires: alabaster, babel, docutils, imagesize, Jinja2, packaging, Pygments, requests, setuptools, snowballstemmer, sphinxcontrib-applehelp, sphinxcontrib-devhelp, sphinxcontrib-htmlhelp, sphinxcontrib-jsmath, sphinxcontrib-qthelp, sphinxcontrib-serializinghtml
[<...> docs]$ sphinx-quickstart
Welcome to the Sphinx 1.1.3 quickstart utility.我有另一台Linux机器安装斯芬克斯,它显示了正确的狮身人面像版本和构建版本。
原木-
[<...> docs]$ pip show sphinx
Name: Sphinx
Version: 4.2.0
Summary: Python documentation generator
Home-page: https://www.sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: <...>/.local/lib/python3.6/site-packages
Requires: sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, requests, babel, packaging, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, Jinja2, Pygments, snowballstemmer, alabaster, docutils, setuptools, sphinxcontrib-applehelp, imagesize, sphinxcontrib-devhelp
Required-by: sphinxcontrib-confluencebuilder, rinohtype, recommonmark
[<...> docs]$ sphinx-build --version
sphinx-build 4.2.0发布于 2021-12-17 06:06:15
这个问题在删除python之后得到解决,1.1.3版本被删除,sphinx在4.3.1的最新版本上运行良好。
原木-
[<...> ~]$ sudo yum remove python-sphinx
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package python-sphinx.noarch 0:1.1.3-11.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Removing:
python-sphinx noarch 1.1.3-11.el7 @base 3.5 M
Transaction Summary
========================================================================================================================================================================
Remove 1 Package
Installed size: 3.5 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : python-sphinx-1.1.3-11.el7.noarch 1/1
Verifying : python-sphinx-1.1.3-11.el7.noarch 1/1
Removed:
python-sphinx.noarch 0:1.1.3-11.el7
Complete!
[<...> docs]$ sphinx-build --version
-bash: /usr/bin/sphinx-build: No such file or directory
[<...> ~]$ pip show sphinx
Name: Sphinx
Version: 4.3.1
这条线有助于解决这个问题。Sphinx working on python 3 interpreter
https://stackoverflow.com/questions/70378956
复制相似问题