Skip to content

"Runtime dependency of PyGObject is missing" error

Ian Hellen edited this page May 18, 2022 · 2 revisions

I see error "Runtime dependency of PyGObject is missing" when I load a query provider

qry_prov = QueryProvider("AzureSentinel")

Warning details

Runtime dependency of PyGObject is missing.
Depends on your Linux distro, you could install it system-wide by something like:
    sudo apt install python3-gi python3-gi-cairo gir1.2-secret-1
If necessary, please refer to PyGObject's doc:
https://pygobject.readthedocs.io/en/latest/getting_started.html
Traceback (most recent call last):
  File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/msal_extensions/libsecret.py", line 21, in <module>
    import gi  # https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/Encryption-on-Linux
ModuleNotFoundError: No module named 'gi'

You can fix this by running the following from a notebook:

%conda install --yes -c conda-forge pygobject

Make sure that this command is prefixed with a "%" and not a "!"