问题
安装完 conda
之后,将所有的 python
都转指向 conda
之后,gnome-terminal
出现 No module named 'gi'
# 执行命令
$ gnome-terminal
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
ModuleNotFoundError: No module named 'gi'
# 同时发现 pip 安装命令也失效咯
# pip install pygobject 时出现 No module named 'lsb_release'
# 直接查看命令结果如下:
$ lsb_release -a
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 25, in <module>
import lsb_release
ModuleNotFoundError: No module named 'lsb_release'
# 直接删掉即可
$ sudo rm /usr/bin/lsb_release
# 执行安装命令即可
$ conda install -c conda-forge pygobject
# 验证下结果
$ gnome-terminal
网友评论