ImportError:无法导入名称 GUdev,未找到内省类型库

ImportError:无法导入名称 GUdev,未找到内省类型库

有人可以建议我如何修复 Kazam 截图应用程序标准应用程序中的错误吗:

alistair@alsE590:~$ kazam
/usr/bin/kazam:77: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  dist = platform.linux_distribution()
Traceback (most recent call last):
  File "/usr/bin/kazam", line 148, in <module>
    from kazam.app import KazamApp
  File "/usr/local/lib/python3.7/dist-packages/kazam/app.py", line 36, in <module>
    from kazam.backend.prefs import *
  File "/usr/local/lib/python3.7/dist-packages/kazam/backend/prefs.py", line 30, in <module>
    from kazam.backend.webcam import Webcam
  File "/usr/local/lib/python3.7/dist-packages/kazam/backend/webcam.py", line 24, in <module>
    from gi.repository import GObject, GUdev
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 133, in load_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name GUdev, introspection typelib not found

答案1

我在 Ubuntu 20 Lts 上遇到了同样的错误

我使用 ppa 安装了 kazam:

sudo apt-add-repository ppa:sylvain-pineau/kazam
sudo apt-get update
sudo apt-get install kazam 

要修复它 - 卸载 kazam、ppa-reposotiroy,然后从标准 Ubuntu repo 安装 kazam:

sudo apt-get purge --auto-remove kazam
sudo apt-get install ppa-purge
sudo ppa-purge ppa:sylvain-pineau/kazam
sudo apt-get install kazam

现在它运行良好。

答案2

您需要安装该包gir1.2-gudev-1.0

相关内容