Sphinx 构建错误

Sphinx 构建错误

我在我的机器上编译了一些应用程序,最近一直收到无法构建文档的错误。似乎与 sphinx 有关。当我运行 sphinx-build 时,我收到此错误:

Traceback (most recent call last):
  File "/usr/bin/sphinx-build", line 33, in <module>
    sys.exit(load_entry_point('Sphinx==4.3.2', 'console_scripts', 'sphinx-build')())
  File "/usr/bin/sphinx-build", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 43, in <module>
    from sphinx.registry import SphinxComponentRegistry
  File "/usr/lib/python3/dist-packages/sphinx/registry.py", line 24, in <module>
    from pkg_resources import iter_entry_points
ModuleNotFoundError: No module named 'pkg_resources'

我尝试过卸载/重新安装 python3-sphinx,但目前没有任何效果。
我希望得到一些帮助或建议。
我在 Ubuntu 22.04.1 上。

谢谢。

相关内容