Ubuntu终端无法打开

打开终端失败,提示错误,

Traceback (most recent call last):
  File "/usr/bin/gnome-terminal", line 9, in <module>
    from gi.repository import GLib, Gio
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 41, in <module>
    from . import _gi
ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/__init__.py)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/gnome-terminal", line 9, in <module>
    from gi.repository import GLib, Gio
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 41, in <module>
    from . import _gi
ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/__init__.py)

When the terminal is launched using gnome-terminal. (This is done through the Pycharm terminal, which still works for some reason). Python3 was updated to 3.8, but python is still on version 2.7.

The guidelines here were followed, as well as from here (Both of which were since undone), as well as a reinstall of both python 3.8, and python 2.7 but, the problem still persisted.

请注意,在我的系统上看不到第二个链接中遇到的错误,但是按照以下步骤尝试减轻了循环导入错误。 python安装绝对没有损坏。尝试第二种解决方案时,在遇到pgi错误之前无法导入gi。

通过Pycharm终端运行的所有设备均正常运行,但是,某些东西(例如Ubuntu上的更新管理器)已损坏(持久性“检查更新时出现问题”)。

当前版本是18.04.4