安装 Python 3.8 后 pip3 不再起作用

安装 Python 3.8 后 pip3 不再起作用

我在 Ubuntu 18.04.4 上安装了 python3.8。现在pip不再起作用了。当我尝试安装某些东西时,它出现此错误:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.8/site-packages/pip/__init__.py", line 45, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/local/lib/python3.8/site-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/usr/local/lib/python3.8/site-packages/pip/download.py", line 36, in <module>
    from pip.utils.glibc import libc_ver
  File "/usr/local/lib/python3.8/site-packages/pip/utils/glibc.py", line 4, in <module>
    import ctypes
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

请帮忙

相关内容