Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

why it breaks at line 28?

with line 28 uncommented, it throws error below:

PythonException: An exception was thrown from the Python worker. Please see the stack trace below. Traceback (most recent call last): File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 1232, in main func, profiler, deserializer, serializer = read_udfs(pickleSer, infile, eval_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 1068, in read_udfs udfs.append(read_single_udf(pickleSer, infile, eval_type, runner_conf, udf_index=i)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 530, in read_single_udf f, return_type = read_command(pickleSer, infile) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 91, in read_command command = serializer._read_with_length(file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 174, in _read_with_length return self.loads(obj) ^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 472, in loads return cloudpickle.loads(obj, encoding=encoding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'azure.ai'

 

 

  • Hello Anonymous 

    The error "ModuleNotFoundError: No module named 'azure.ai'" occurs in a Fabric notebook when the required Azure AI Python package is not installed in the current environment. 


    Install this package either as part of session or in Environment.
    %pip install azure-ai-textanalytics

     


    After installation, verify that the package is installed correctly:


    %pip show azure-ai-textanalytics

    If this is helpful , please accept the answer

     

     

4 Replies

  • Hello Anonymous 

    The error "ModuleNotFoundError: No module named 'azure.ai'" occurs in a Fabric notebook when the required Azure AI Python package is not installed in the current environment. 


    Install this package either as part of session or in Environment.
    %pip install azure-ai-textanalytics

     


    After installation, verify that the package is installed correctly:


    %pip show azure-ai-textanalytics

    If this is helpful , please accept the answer

     

     

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi Anonymous 
    As highlighted by nilendraFabric , the proposed approach appears to effectively address your requirements.
    Could you please confirm if your issue has been resolved?
    If you are still facing any challenges, kindly provide further details, and we will be happy to assist you.

    Thanks 
    Cheri Srikanth

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi Anonymous 
    We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
    Thank you,
    Cheri Srikanth.

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi Anonymous 
    It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
    If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
    Looking forward to your reply!