azureautomation / runbooks

Sample Automation runbooks
MIT License
156 stars 129 forks source link

Unable to update azure sdk for python3 in automation #79

Open jbouzekri opened 3 years ago

jbouzekri commented 3 years ago

I tried to use the import python3 package script to update azure mgmt libraries.

Everything works fine however when I install adal, it installs a new version of cryptographie and now, I am unable to login by token because of the error :

The version of cryptography does not match the loaded shared object. This can happen if you have multiple copies of cryptography installed in your Python path. Please try creating a new virtual environment to resolve this issue. Loaded python version: 3.4.6, shared object version: b'2.8'
alkhos commented 3 years ago

+1 on this issue Appreciate if you can comment on it

bgmonroe commented 3 years ago

+1 too. Until the package management is improved (a lot), Python is effectively unusable in AA.

sHooPmyWooP commented 3 years ago

+1, do you have a workaround to share?

jbouzekri commented 3 years ago

@sHooPmyWooP : I don't have a workaround to use the AzureRunAsConnection. So I fallbacked to ClientSecretCredential for the moment.

sHooPmyWooP commented 3 years ago

For me the broken dependencies were

As a quick and dirty fix, I changed my requirements, to match the automation accounts packages:

This worked, at least for my requirements.

Not using the provided package import runbook, but the REST endpoint.

palten08 commented 2 years ago

Looks like Microsoft has yet to address this, as I've just encountered this and couldn't find anything helpful anywhere in regards to even working around it temporarily.