Kindly install azure-ai-ml library

pip install azure-ai-ml

Optional: pip install azure-identity

Answer from Sachin Ichake on learn.microsoft.com
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 1184521 › how-to-solve-modulenotfounderror-no-module-named-a
How to solve ModuleNotFoundError: No module named 'azure.ai' - Microsoft Q&A
February 28, 2023 - @YQ The error message "ModuleNotFoundError: No module named 'azure.ai'" indicates that the Azure Form Recognizer module is not installed in your environment.
Discussions

ModuleNotFoundError: No module named 'azure'
I just tested it on my end and it's working fine with Python 3.11. I create a file main.py with the code you shared. I added the values for my document intelligence resource. I then ran these commands. python -m venv venv .\venv\Scripts\activate pip install azure-ai-formrecognizer python main.py No errors. I only received your error running the script outside my venv. More on reddit.com
🌐 r/AZURE
2
1
January 6, 2025
Azure Machine Learning - running code in curated environement gives ModuleNotFoundError: No module named 'azure.ai'
The job crashes while trying to execute from azure.ai.ml import MLClient in the curated environment AzureML-ACPT-pytorch-1.13-py38-cuda11.7-gpu:1 I am getting: from azure.ai.ml import MLClient ModuleNotFoundError: No module named 'azure.ai' How… More on learn.microsoft.com
🌐 learn.microsoft.com
1
0
February 25, 2023
azure.ai.ml package missing from compute instance software version 25.06.10
I just created a new compute instance on Azure Machine Learning. It is running Compute instance software version: Linux 25.06.10 (current). I can't run my notebooks or scripts because I get the error "ModuleNotFoundError: No module named… More on learn.microsoft.com
🌐 learn.microsoft.com
3
0
July 4, 2025
Python Azure Packages Not Recognized
Hi - I cannot get the Azure packages to run. I've tried it in virtual environments with Python 3.8, 3.10 and 3.11. I continuously get the following error, despite the fact it shows as installed. python file: from azure.ai.formrecognizer import… More on learn.microsoft.com
🌐 learn.microsoft.com
0
0
October 9, 2023
🌐
Reddit
reddit.com › r/azure › modulenotfounderror: no module named 'azure'
r/AZURE on Reddit: ModuleNotFoundError: No module named 'azure'
January 6, 2025 -

im trying to import a library like this :

from azure.core.credentials import AzureKeyCredential
from azure.ai.formrecognizer import DocumentAnalysisClient

endpoint = "https://<my-custom-subdomain>.cognitiveservices.azure.com/"
credential = AzureKeyCredential("<api_key>")
document_analysis_client = DocumentAnalysisClient(endpoint, credential)

and i downloaded prior to that the library :
pip install azure-ai-formrecognizer

and when i run pip list it shows the library is there :

(.venv) PS C:\projects\mastercontrol> pip3 list

Package Version

----------------------- ----------

azure-ai-formrecognizer 3.3.3

azure-common 1.1.28

azure-core 1.32.0

certifi 2024.12.14

charset-normalizer 3.4.1

idna 3.10

isodate 0.7.2

msrest 0.7.1

oauthlib 3.2.2

pip 24.3.1

requests 2.32.3

requests-oauthlib 2.0.0

six 1.17.0

typing_extensions 4.12.2

urllib3 2.3.0

but im still getting that azure module doesnt exist any help ?
Azure Form Recognizer client library for Python | Microsoft Learn

🌐
Edureka Community
edureka.co › home › community › categories › cloud computing › azure › how to solve modulenotfounderror no module named...
How to solve ModuleNotFoundError No module named azure ai | Edureka Community
October 27, 2024 - I'm working on a Python project using Azure AI services, but when I try to run the code, I keep getting ... this issue is on my side-how can I fix it?
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 1184301 › azure-machine-learning-running-code-in-curated-env
Azure Machine Learning - running code in curated environement gives ModuleNotFoundError: No module named 'azure.ai' - Microsoft Q&A
February 25, 2023 - The job crashes while trying to execute from azure.ai.ml import MLClient in the curated environment AzureML-ACPT-pytorch-1.13-py38-cuda11.7-gpu:1 I am getting: from azure.ai.ml import MLClient ModuleNotFoundError: No module named 'azure.ai' How…
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 2338465 › azure-ai-ml-package-missing-from-compute-instance
azure.ai.ml package missing from compute instance software version 25.06.10 - Microsoft Q&A
July 4, 2025 - !source activate azureml_py310_sdkv2 && python -c "import azure.ai.ml; print('OK')" or switch the notebook kernel accordingly if available. 1 comment Show comments for this answer Report a concern ... # packages in environment at /anaconda/envs/azureml_py310_sdkv2: # # Name Version Build Channel _libgcc_mutex 0.1 main _openmp_mutex 5.1 1_gnu aiosignal 1.3.2 pypi_0 pypi asttokens 3.0.0 pyhd8ed1ab_1 conda-forge attrs 25.3.0 pypi_0 pypi azure-core 1.34.0 pypi_0 pypi azure-identity 1.23.0 pypi_0 pypi azureml-dataprep 5.1.6 pypi_0 pypi azureml-dataprep-native 41.0.0 pypi_0 pypi azureml-dataprep-rsl
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 1386552 › python-azure-packages-not-recognized
Python Azure Packages Not Recognized - Microsoft Q&A
October 9, 2023 - .venv) PS C:\Users\ChrisSommers\repos\azure> & c:/Users/ChrisSommers/repos/azure/.venv/Scripts/python.exe c:/Users/ChrisSommers/repos/azure/azure.py Traceback (most recent call last): File "c:/Users/ChrisSommers/repos/azure/azure.py", line 2, in <module> from azure.ai.formrecognizer import DocumentAnalysisClient File "c:\Users\ChrisSommers\repos\azure\azure.py", line 2, in <module> from azure.ai.formrecognizer import DocumentAnalysisClient ModuleNotFoundError: No module named 'azure.ai'; 'azure' is not a package (.venv) PS C:\Users\ChrisSommers\repos\azure> pip show azure-ai-formrecognizer Nam
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-ie › answers › questions › 1859404 › how-to-fix-modulenotfounderror-no-module-named-azu
how to fix ModuleNotFoundError: No module named 'azure.ai.vision.imageanalysis' - Microsoft Q&A
pip install --upgrade azure-ai-vision-imageanalysis ... After performing these steps, try running your script again. If you continue to encounter issues, there may be additional problems with the environment setup that need to be addressed. For more details, please refer - Install the Image Analysis SDK · Checkout this article/document for more info: Python on Linux App Service and ModuleNotFoundError.
🌐
GitHub
github.com › Azure › azure-sdk-for-python › issues › 44083
ModuleNotFoundError: No module named 'azure.ai.agents' · Issue #44083 · Azure/azure-sdk-for-python · GitHub
November 17, 2025 - from azure.ai.agents.models import CodeInterpreterTool ModuleNotFoundError: No module named 'azure.ai.agents' To Reproduce Steps to reproduce the behavior: Install the latest packages · pip install azure-ai-projects pip install azure-identity · Copy the quickstart code, or add imports to your .py file: from azure.ai.agents.models import CodeInterpreterTool ·
Author: Azure
🌐
Oreate AI
oreateai.com › blog › resolving-the-modulenotfounderror-no-module-named-azureai › 2d2bc3625773c6ca0d0c743ea4cd7b56
Resolving the ModuleNotFoundError: No Module Named 'azure.ai' - Oreate AI Blog
January 15, 2026 - This command will fetch and install any missing components from Azure's SDK for Python. If you've already done that but still encounter issues, consider creating a new virtual environment specifically for your project. Sometimes lingering conflicts from previous installations can cause unexpected behavior in package management systems like pip. You can create a new virtual environment with these commands: pip install virtualenv # Install virtualenv if not already installed directory_name = "my_project_env" virtualenv directory_name # Create a new environment afterwards activate it depending on OS...
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 2154813 › how-to-import-azure-ai-ml-in-to-local-jupyter-note
How to import azure.ai.ml in to local jupyter notebook running python? - Microsoft Q&A
You can run them outside of the Azure Portal/ML environment, including your local Jupyter Notebook. The ModuleNotFoundError you’re experiencing usually means that the Python package you need in your environment is not installed.
Top answer
1 of 4
2
The error message ModuleNotFoundError: No module named 'azure.ai.language' indicates that the Python module azure.ai.language is not installed in your current environment. To use the Azure AI Language services, you need to install the azure-ai-language package. You can do this in Google Colab by running the following command at the beginning of your notebook: !pip install azure-ai-language After running this command, you should be able to import the ConversationAnalysisClient from azure.ai.language.conversations without any issues. Please note that you should replace "Azue OpenAI Keys" and "Azue OpenAI Endpoint" with your actual Azure OpenAI keys and endpoint. Be sure to keep these credentials secure and do not share them publicly. Here’s your updated code: !pip install azure-ai-language from azure.core.credentials import AzureKeyCredential from azure.ai.language.conversations import ConversationAnalysisClient # Azure OpenAI Credentials key = "Your Azure OpenAI Key" endpoint = "Your Azure OpenAI Endpoint" # Create a conversation analysis client credential = AzureKeyCredential(key) conversation_client = ConversationAnalysisClient(endpoint=endpoint, credential=credential) # Prompt prompt = "What is the capital of India?" # Analyze sentiment response = conversation_client.analyze_sentiment(prompt) # Extract sentiment sentiment = response.sentiment # Print the sentiment print("Sentiment:", sentiment) Remember to replace "Your Azure OpenAI Key" and "Your Azure OpenAI Endpoint" with your actual Azure OpenAI key and endpoint. Thanks
2 of 4
2
Try this: response = conversation_client.analyze(conversation=prompt)
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 825079 › azure-ai-textanalytics-not-resolved-in-machine-lea
azure.ai.textanalytics not resolved in Machine Learning Studio - Microsoft Q&A
April 25, 2022 - ModuleNotFoundError Traceback (most recent call last) <ipython-input-4-54158a600368> in <module> 1 from azure.core.credentials import AzureKeyCredential ----> 2 from azure.ai.textanalytics import TextAnalyticsClient 3 4 5 credential = AzureKeyCredential("***************************") ModuleNotFoundError: No module named 'azure.ai' Does anyone has an idea what to do here?
🌐
Microsoft Learn
learn.microsoft.com › en-ie › answers › questions › 5889638 › how-can-i-fix-error-no-module-named-azure-identity
How can I fix error No module named 'azure.identity' for line: import azure.identity? - Microsoft Q&A
May 13, 2026 - ModuleNotFoundError in the notebook kernel means azure-identity is installed in a different Python environment than the one used by the AzureML kernel. In this scenario, pip install azure-ai-ml and pip install azure-identity were run in a terminal ...
🌐
GitHub
github.com › Azure › azure-sdk-for-python › issues › 40992
azure-ai-evaluation failed with module not found · Issue #40992 · Azure/azure-sdk-for-python · GitHub
May 9, 2025 - Package Name: azure-ai-evaluation Package Version: 1.6.0 Operating System: linux Python Version: 3.10 Describe the bug A clear and concise description of what the bug is. This started from today 5/8, I'm suspecting some breaking change i...
Author: Azure
🌐
Itsourcecode
itsourcecode.com › home › modulenotfounderror: no module named azure
modulenotfounderror: no module named azure [SOLVED]
April 5, 2023 - You can install the module with ... prompt: pip install azure. If your spelling is incorrect the module name in your code or import statement, you will get the ModuleNotFoundError error....
🌐
GitHub
github.com › Azure › azure-sdk-for-python › issues › 30582
azure-ai-formrecognizer: ModuleNotFoundError: No module named 'azure.core.polling.base_polling' · Issue #30582 · Azure/azure-sdk-for-python · GitHub
May 31, 2023 - Package Name: azure-ai-formrecognizer Package Version: azure-ai-formrecognizer>=3.0.0, azure-core==1.26.4 Operating System: Linux Python Version: 3.10 Describe the bug Traceback (most recent cal...
Author: Azure
🌐
Reddit
reddit.com › r/vscode › azure function development in visual studio code: not able to find azure.identity module
r/vscode on Reddit: Azure Function Development in Visual Studio Code: Not able to find azure.identity module
March 9, 2023 -

I'm creating an Azure Function with Python runtime in vs code, the environment of the function is set up by Vs code, and the function is getting executed by vs code using Azure core tools in debug mode. While setting up, the environment a requirements.txt file was also created.

I have added the 'azure-identity' to the requirements.txt file. When I execute the function, the azure-identity is getting installed(I'm assuming so since the module is accessible from the code file in vs code, by clicking on the import statement), but the function is giving an error:

 Result: Failure Exception: ModuleNotFoundError: No module named 'azure.identity'. Please check the requirements.txt file for the missing module. For more info, please refer the troubleshooting guide: https://aka.ms/functions-modulenotfound

Can anyone please let me know, how can I resolve the issue?