当我想切换到 python 3.8 时,看起来我已经破坏了我的 python 安装。使用 Ubuntu 18.04。尝试使用gi
,会出现以下错误:
$ python
Python 3.8.1 (default, Dec 31 2019, 18:42:42)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib, Gio
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, 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)
尝试为 python 运行 update-alternatives,但它告诉我只配置了一个 python 替代方案(3.8)。
试图重新安装python3-gi和python3.8。还是同样的问题