【问题标题】:Sphinx showing old build version in Linux CentosSphinx 在 Linux Centos 中显示旧版本
【发布时间】:2022-01-19 12:58:03
【问题描述】:

我在我的 Centos 机器上安装了 sphinx,它显示它已经安装了最新的 sphinx 版本,即 4.3.0,但是在运行“sphinx-quickstart”或检查“sphinx-build --version”时,它显示的是 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.

我有另一台我之前安装 sphinx 的 Linux 机器,它显示了正确的 sphinx 版本和构建版本。

日志-

[<...> 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

【问题讨论】:

    标签: python-sphinx


    【解决方案1】:

    删除 python-sphinx 后问题得到解决,版本 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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-12
      • 1970-01-01
      • 2015-10-19
      • 1970-01-01
      • 1970-01-01
      • 2012-07-20
      • 2019-06-23
      • 2016-10-12
      相关资源
      最近更新 更多