CentOS 7 gnome桌面多个设置软件不可用 - 草稿

输入法不能设置问题

CentOS 7 升级之后,发现拼音输入法不能设置,使用命令行 ibus-setup 进行设置时,无法打开汉语的 preference,查看终端显示 问题:

ImportError: No module named gi.repository

也就是python 库文件有问题。

打开 python 交互界面,import gi 不成功,pip install gi 也不成功。

->$ python
Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct 16 2017, 17:29:19) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named gi
>>> 
->$ pip install gi
Collecting gi
  Could not find a version that satisfies the requirement gi (from versions: )
No matching distribution found for gi

后发现是安装了 Anaconda2,导致系统默认使用 Anaconda 提供的 python 2.7.14,而我的系统本身的 python 被替代了。

使用 /usr/bin/python,发现 import gi 成功。也就是系统自带的 python 是存在 gi 库的。

  • 解决办法: 将 gi 库链接给 Anaconda 就好了

正常使用

ln -s /usr/lib64/python2.7/site-packages/gi ~/myopt/anaconda2/lib/python2.7/site-packages/

如果你想在 conda 虚拟环境中使用 gi 库:

ln -s /usr/lib64/python2.7/site-packages/gi ~/myopt/anaconda2/envs/TEST/lib/python2.7/site-packages/

成功!

Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct 16 2017, 17:29:19) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.__version__
'3.22.0'
>>> 

触摸板不能设置问题

自己手贱,在setting里把鼠标和触摸板的设置改动了下,然后发现,触摸板不能滑动了,各种不舒服。
鼓捣了半天,做了文件链接,处理好了。这个方法不推荐。

今天在处理输入法这个问题的时候,顺带发现触摸板可以设置了!!!也就是说这个触摸板不能设置和输入法不能设置都是 tweak tool 出现了问题,现在解决了。

总结 系统自带python很重要,没事儿别瞎鼓捣,尤其是使用管理员权限!!!

gi 库和图形显示有关,tweak tool 等都需要这个。

你可能感兴趣的:(CentOS 7 gnome桌面多个设置软件不可用 - 草稿)