centos7 failed to open optimization tool in launcher

Type in the terminal:

sudo gnome-tweak-tool

show

Traceback (most recent call last):
  File "/usr/bin/gnome-tweak-tool", line 23, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'


The default python of centos7 is python3, and some old programs use python2

Guess this is causing the problem to be the first line in /usr/bin/gnome-tweak-tool

#!/usr/bin/env python

change to

#!/usr/bin/env python2

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324975395&siteId=291194637