Skip to content

MSAL extensions fails in Anaconda linux environment #114

@ianhelle

Description

@ianhelle

I filed an issue in the msal conda-forge feedstock about this
conda-forge/msal_extensions-feedstock#10 (comment)

We're seeing a failure on Azure Machine Learning computes. I can also repro this in other Ubuntu environments.
Trying to use msal_extensions with an encrypted token cache fails as follows:

  • initially it fails with the missing gi dependency
  • conda install pygobject fixes that but then fails on `gi.require_version("Secret", "1")
  • installing gir1.2-secret-1 has no effect on this.
  • conda install libsecret also doesn't fix this.
  • manually (apt) installing gir1.2-secret-1 allows this to work in the system python3 but not in conda

The following repros on Ubuntu 18.04.6 LTS and Ubuntu 22.04 LTS

Conda behavior

Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:39:04) [GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.require_version("Secret", "1")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ian/anaconda3/envs/libsecret/lib/python3.10/site-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Secret not available

non-conda Python behavior

(libsecret) ian@IanHelle-dev2:/mnt/e/src$ conda deactivate
(base) ian@IanHelle-dev2:/mnt/e/src$ conda deactivate
ian@IanHelle-dev2:/mnt/e/src$ python3
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.require_version("Secret", "1")
>>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions