How to solve ModuleNotFoundError: No module named 'azure.ai'

YQ 45 Reputation points
2023-02-27T07:28:24.44+00:00

Im testing on Azure form recognizer. After I tested it and I got the code under Form Recognizer Studio page, I copied the code into Azure machine learning studio's Jupyter notebook. I able to run the code for the first day of my testing. The next day I open this file, this code cannot be rerun and the result showed the error as ModuleNotFoundError: No module named 'azure.ai'.

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,290 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ramr-msft 17,596 Reputation points
    2023-02-28T10:06:54.95+00:00

    @YQ The error message "ModuleNotFoundError: No module named 'azure.ai'" indicates that the Azure Form Recognizer module is not installed in your environment. To resolve this issue, you can try to install the Azure Form Recognizer module by running the following command in your terminal:

    pip install azure-ai-formrecognizer==3.2.0

    If you still face the same issue, you can try to create a new environment and install the Azure Form Recognizer module in the new environment. You can open your code in the VSCode and run the sample.


  2. Ramr-msft 17,596 Reputation points
    2023-05-02T10:30:48.68+00:00

    @YQ Thanks, We have forwaded to the product team for fixing the issue in Azure ML notebooks. As a workaround you can open in the VS code as shown below and run successfully without any issue in VS code.

    if you are encountering an error related to importing azure.ai.formrecognizer, it could be due to a missing or outdated installation of the Azure SDK for Python. You can try updating your installation by running pip install azure-cognitiveservices-formrecognizer in your terminal or command prompt. If that doesn't work, you can try uninstalling and reinstalling the Azure SDK for Python using pip uninstall azure-cognitiveservices-formrecognizer and pip install azure-cognitiveservices-formrecognizer, respectively.

    User's image

    0 comments No comments