我使用以下命令在 Ubuntu 20.04.1 上安装了 kazam:
sudo apt-add-repository ppa:sylvain-pineau/kazam
sudo apt-get update
sudo apt-get install kazam
启动 kazam 时出现以下错误:
/usr/bin/kazam:32: PyGIWarning: Gtk was imported without specifying a
version first. Use gi.require_version('Gtk', '3.0') before import to
ensure that the right version gets loaded. from gi.repository import
Gtk WARNING Kazam - Failed to correctly detect operating system.
/usr/lib/python3/dist-packages/kazam/backend/webcam.py:24:
PyGIWarning: GUdev was imported without specifying a version first.
Use gi.require_version('GUdev', '1.0') before import to ensure that
the right version gets loaded. from gi.repository import GObject,
GUdev Traceback (most recent call last): File "/usr/bin/kazam", line
147, in <module>
from kazam.app import KazamApp File "/usr/lib/python3/dist-packages/kazam/app.py", line 36, in <module>
from kazam.backend.prefs import * File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 566, in
<module>
prefs = Prefs() File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 142, in
__init__
self.config = KazamConfig() File "/usr/lib/python3/dist-packages/kazam/backend/config.py", line 87, in
__init__
ConfigParser.__init__(self, self.DEFAULTS[0]['keys']) File "/usr/lib/python3.8/configparser.py", line 639, in __init__
self._read_defaults(defaults) File "/usr/lib/python3.8/configparser.py", line 1219, in _read_defaults
self.read_dict({self.default_section: defaults}) File "/usr/lib/python3.8/configparser.py", line 754, in read_dict
self.set(section, key, value) File "/usr/lib/python3/dist-packages/kazam/backend/config.py", line 150, in
set
self.add_section(section) File "/usr/lib/python3.8/configparser.py", line 1208, in add_section
super().add_section(section) File "/usr/lib/python3.8/configparser.py", line 656, in add_section
raise ValueError('Invalid section name: %r' % section)
答案1
更新 20210115:最新的 kazam 1.5.4-0ubuntu6 来自这里电力供应协议正常工作。
感谢 PPA 所有者!
笔记:
- 有些系统需要手动安装程序
gir1.2-gudev-1.0
包。 - 可能的选择是OBS Studio 快照。
答案2
您可以简单地使用:
pip install --upgrade --force-reinstall kazam
并删除~/.config/kazam/kazam.conf