microsoft-authentication-extensions-for-python icon indicating copy to clipboard operation
microsoft-authentication-extensions-for-python copied to clipboard

MSAL extensions fails in Anaconda linux environment

Open ianhelle opened this issue 3 years ago • 0 comments

I filed an issue in the msal conda-forge feedstock about this https://github.com/conda-forge/msal_extensions-feedstock/issues/10#issuecomment-1133186185

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")
>>>

ianhelle avatar May 20 '22 18:05 ianhelle