ImportError: No module named gi.repository

后端 未结 6 1217
情歌与酒
情歌与酒 2021-01-04 10:40

I\'m trying to launch python script on Ubuntu 10.04:

from gi.repository import Nautilus, GObject

It doesn\'t work:

Traceback (most recent         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 11:09

    Try to fix it by installing PyGObject:

    # With Apt on Ubuntu:
    $ sudo apt install python3-gi
    
    # With Yum on CentOS / RHEL:
    $ sudo yum install python36-gobject.x86_64 
    
    # Or directly with Pip:
    $ pip3 install PyGObject  
    

提交回复
热议问题