microsoft-authentication-extensions-for-python
microsoft-authentication-extensions-for-python copied to clipboard
MSAL extensions fails in Anaconda linux environment
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
gidependency conda install pygobjectfixes that but then fails on `gi.require_version("Secret", "1")- installing gir1.2-secret-1 has no effect on this.
conda install libsecretalso 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")
>>>