question

KamranAli-0346 avatar image
0 Votes"
KamranAli-0346 asked KamranAli-0346 commented

azure.ai.textanalytics not resolved in Machine Learning Studio

Hello,
I am using a Python notebook in the Machine Learning Studio for extracting Health Info from a given text.
However, the Machine Learning Studio refuses to recognize the below line of code:

 from azure.ai.textanalytics import TextAnalyticsClient

The error received is as below:

 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?

Thanks


azure-machine-learningazure-healthcare-apis
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Updates:

What I found out is that the same code works in the Python Notebook (with extension .py) but does not work in the notebook with extension .ipynb. This is very weird

0 Votes 0 ·

Hello @KamranAli-0346

A possible reason is because the path of the package is not installed correctly, I will double check internally. Thanks for your clues!

Regards,
Yutong

0 Votes 0 ·

Hi @YutongTie-MSFT ,
Another "Clue" :-)

If I open the file via Menu --> Editors --> Edit in JupyterLab then it also works.

Thanks.

Kamran.

0 Votes 0 ·

Hello @KamranAli-0346

Then I pretty confirm it's package path issue, I am trying to reproduce the issue then we will know what is it. Thanks a lot for the clue.

Regards,
Yutong

0 Votes 0 ·
Show more comments

1 Answer

Azadeh-9323 avatar image
0 Votes"
Azadeh-9323 answered KamranAli-0346 commented

You should check the path, this happened to me when I install packages from local but run it from local machine.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Azadeh-9323 Can you please provide steps on how to check path?

0 Votes 0 ·