Python Azure Packages Not Recognized

Chris Sommers 0 Reputation points
2023-10-09T13:09:14.0366667+00:00

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 DocumentAnalysisClient
from azure.core.credentials import AzureKeyCredential

and the console then shows:

.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
Name: azure-ai-formrecognizer
Version: 3.3.0
Summary: Microsoft Azure Form Recognizer Client Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
Author-email: azpysdkhelp@microsoft.com
License: MIT License
Location: c:\users\chrissommers\repos\azure\.venv\lib\site-packages
Requires: azure-common, azure-core, msrest, typing-extensions
Required-by:
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,436 questions
{count} votes