Pip3 无法在 Ubuntu Jammy 上运行

Pip3 无法在 Ubuntu Jammy 上运行

我正在尝试安装 pip3 包。当运行“pip3 install mitype”时,我在终端中收到以下错误:

$ pip3 install mitype

Traceback (most recent call last):
  File "/home/trent/.local/bin/pip3", line 5, in <module>
    from pip import main
  File "/home/trent/.local/lib/python3.10/site-packages/pip/__init__.py", line 13, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/home/trent/.local/lib/python3.10/site-packages/pip/utils/__init__.py", line 23, in <module>
    from pip._vendor import pkg_resources
  File "/home/trent/.local/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 32, in <module>
    import symbol
ModuleNotFoundError: No module named 'symbol'

在 Stackoverflow 上,解决方案因为这似乎是运行pip3 install --upgrade pip3 setuptoolspip install --upgrade pip setuptools为 Python 2。然而,这两个对我来说都不起作用,我仍然得到相同的错误。我该如何解决这个问题?

相关内容