henrywoo / kazam

Kazam2 - Linux Screen Recorder, Broadcaster, Capture and OCR with AI in mind
https://github.com/henrywoo/kazam
GNU General Public License v3.0
226 stars 22 forks source link

encountering error by running the kazam: ModuleNotFoundError: No module named '_dbus_bindings' #55

Closed agn-7 closed 3 months ago

agn-7 commented 3 months ago

I used to use the kazam with version 1.4.5 properly. now I just updated the latest version via the instructions on the readme as follows:

pip install -U kazam

sudo apt install build-essential libpython3-dev \
    libdbus-1-dev libcairo2-dev libgirepository1.0-dev \
    gir1.2-gudev-1.0 gir1.2-keybinder-3.0 python3-gi python3-gst-1.0 -y

Apparently, it has updated to the newer version 1.5.8 but when I want to run it raise error:

pip show kazam
Name: kazam
Version: 1.5.8
Summary: A screencasting program created with design in mind.
Home-page: https://github.com/henrywoo/kazam
Author: Henry Fuheng Wu, David Klasinc
Author-email: wufuheng@gmail.com
License: Apache-2.0
Location: /home/benyamin/.local/lib/python3.11/site-packages
Requires: cmake, dbus-python, distro, distutils-extra-python, hiq-python, pycairo, PyGObject, python-xlib, pyxdg
Required-by: 

Error:

kazam
Traceback (most recent call last):
  File "/home/benyamin/.local/bin/kazam", line 27, in <module>
    import dbus
  File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 73, in <module>
    import dbus.types as types
  File "/usr/lib/python3/dist-packages/dbus/types.py", line 8, in <module>
    from _dbus_bindings import (
ModuleNotFoundError: No module named '_dbus_bindings'
agn-7 commented 3 months ago

I just fixed that by updating the dbus to the latest version:

pip install -U dbus-python

But now I encountered another issue:

kazam
Traceback (most recent call last):
  File "/home/benyamin/.local/bin/kazam", line 33, in <module>
    import gi
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 40, in <module>
    from . import _gi
ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/__init__.py)
agn-7 commented 3 months ago

Eventually, I fixed the issue by removing this path "/usr/lib/python3/dist-packages/gi/" manually and reinstalling the PyGoObject:

pip install -U pygobject