getsenic / gatt-python

Bluetooth GATT SDK for Python
MIT License
318 stars 86 forks source link

ModuleNotFoundError: No module named 'gi' #71

Open nopium opened 9 months ago

nopium commented 9 months ago
Python 3.11.4 (main, Nov 10 2023, 22:43:44) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import gatt

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".pyenv/versions/3.11.4/lib/python3.11/site-packages/gatt/__init__.py", line 1, in <module>
    from .gatt import DeviceManager, Device, Service, Characteristic
  File ".pyenv/versions/3.11.4/lib/python3.11/site-packages/gatt/gatt.py", line 6, in <module>
    from .gatt_linux import *
  File ".pyenv/versions/3.11.4/lib/python3.11/site-packages/gatt/gatt_linux.py", line 13, in <module>
    from gi.repository import GObject
ModuleNotFoundError: No module named 'gi'
nopium commented 9 months ago

This seems like a relevant solution

https://stackoverflow.com/a/51709431