-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot import name 'AccessTokenInfo' from 'azure.core.credentials' #37491
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github. |
Yes, same for me. It's now a blocker for my CI pipelines. |
This is no blocking all my ML pipelines |
This is blocking our pipelines also |
Thanks for the pointer to $ az extension add --upgrade --name ml -y
$ sudo /opt/az/bin/python3 -m pip install azure-identity==1.17.1 (use at your own risk) |
Also a blocker for me (muliple training pipelines) |
This workaround did work on our case. |
Appears that there is some intermingling of dependencies. Looking at where CLI extension dependencies are installed for me, ( I mentioned this in the linked azure-cli issue, but I think something may need updating in the dependency resolution logic when installing an extension. Ideally, azure-cli extension Python requirements should remain compatible with the base azure-cli requirements when the extension is installed (i.e. azure-identity 1.17.1 should automatically have been installed with the ML extension). I believe the workaround, as mentioned above, is to install an older version of azure-identity in whatever virtual environment azure-cli is using. Example workarounds: Linux: sudo /opt/az/bin/python3 -m pip install azure-identity==1.17.1 Windows (in elevated/administrator terminal): C:\"Program Files (x86)"\"Microsoft SDKs"\Azure\CLI2\python.exe -m pip install azure-identity==1.17.1 Not sure about Mac, but probably just need to run the python executable somewhere in I think you can glean the location of the environment your azure-cli is using based on the error message:
|
@pvaneck for Linux, the workaround works. On my Windows machine, I ran the command (64-bit version), but it doesn't work. |
Same issue here - stopping all of our CI pipelines. |
@toby-coleman As a temporary solution, you can add the following to your requirements.txt for a quick CI pipelines fix:
|
For our azure pipelines the following command works |
This issue has been resolved. Please retry. |
please correct me if I am misunderstanding but this solution assumes that we are using / installed the azure-cli package. In our case we are not. |
@ezpzzz19 The latest version of If you are seeing this issue outside of the context of Azure CLI or the Azure CLI ML extension, then please open another issue. |
The mentioned issue #37790 has two fixes that work for me:
|
Deployment has resumed. I will update again when fully deployed. Once fully deployed, you will be able to use the new version of Azure Core even when using Autoinstrumentation (The feature the previous comment says to disable). Until then, using Manual Instrumentation is recommended if you need the latest version of Azure Core. EDIT: I am talking about customers that get this error on App Service using App Insights Python Autoinstrumentation. For example, see this issue. Some such customers have linked this issue. However, I now see that some customers in this thread are experiencing this in pipelines instead of App Service. This appears to be completely separate. |
@jeremydvoss / @miladh - Are we still facing the similar issue with latest version of CLI extension 2.34.0? |
Hi @miladh. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Using version 2.33.1 currently and no longer facing the issue. |
For those getting the same error on App Service despite specifying the right version of azure-core==1.32.0, that issue has been fixed. Since the separate issue of az-ai-ml appears to be solved with version 2.33.1. I recommend closing this issue. |
Hi @miladh. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
Hi @miladh, since you haven’t asked that we |
Describe the bug
Note
Apologies if this issue should have been created in a different repository. Please let me know if I should create this ticket elsewhere.
In this PR, the minimum version of azure-core was updated to include the new
SupportTokenInfo
protocol andAccessTokenInfo
class. However, when attempting to install the Azure ML extension using:the following error occurs:
As this issue is currently disrupting our CI pipelines, we would be grateful for any guidance you can provide to help us address it promptly.
Possible Cause
This issue seems to arise because the Azure ML extension installs
azure_identity-1.18.0
, which relies onAccessTokenInfo
fromazure.core.credentials
. However,azure-cli
version2.64.0
still uses an older version of azure-core (1.28.0
), and hence the error above is thrown.For reference, here’s the azure-cli requirements file.
To Reproduce
Steps to reproduce the behavior:
az extension add --name ml
The text was updated successfully, but these errors were encountered: