Share via

import error for TextAnalyticsClient

Inoue, Kota 21 Reputation points
2021-12-22T10:09:03.87+00:00

I am following Microsoft official document for sentiment analysis.
https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/sentiment-opinion-mining/quickstart?pivots=programming-language-python

However, I am having import error to import TextAnalyticsClient.
This code cause error message like this.

from azure.ai.textanalytics import TextAnalyticsClient

ImportError: cannot import name 'is_rest'

How can I solve this error?

Azure Language in Foundry Tools
Azure Language in Foundry Tools

An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.


1 answer

Sort by: Most helpful
  1. Ramr-msft 17,836 Reputation points
    2021-12-30T00:18:56.92+00:00

    @Inoue, Kota Thanks, After installing the client library we couldn't see any import error.

    pip install azure-ai-textanalytics==5.1.0

    Please find the sanpshot for the same.
    161197-image.png

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

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.