MagicUsageError, Error value - %pip magic command is disabled

VR 0 Reputation points
2024-08-09T21:37:05.98+00:00

Hi,

I have created a pipeline in Microsoft Fabric and the first step is FHIR data export. It erred with the message "Notebook execution failed at Notebook service with http status code - '200', please check the Run logs on Notebook, additional details - 'Error name - MagicUsageError, Error value - %pip magic command is disabled.'".

I came across this link and I created an environment and set it as my workspace's default. However I could not find 'semantic-link' library, but saw semantic-version library which I added, saved and published.

I still get the same error - do I need to install semantic-link library on top of semantic-version? Also I see in the above link asking to comment out installation of semantic-link. Where is the file to uncomment from located?

Thanks,
VR

Community Center Not monitored
{count} votes

7 answers

Sort by: Most helpful
  1. Konstantinos Passadis 19,586 Reputation points MVP
    2024-08-09T22:28:36.05+00:00

    Hello @VR

    Welcome to Microsoft QnA!

    yes you are right

    I would select :

    https://pypi.org/project/semantic-link-sempy/

    The Core functionalties are there

    Also

    If you read my blog you will see that you cant run pip commands on Pipeline Noteboooks

    Be careful do not forget a Pip commad there !

    As you correctly stated you create a Fabric Environment with all the required packages

    https://learn.microsoft.com/en-us/fabric/data-engineering/create-and-use-environment

    https://cloudblogger.eu/2024/07/23/azure-ai-search-nativity-in-microsoft-fabric/

    So create an Encironment , add the packages and select it on your Pipeline run !

    These Links offer additional details on your issue :

    https://learn.microsoft.com/en-us/python/api/semantic-link/overview-semantic-link?view=semantic-link-python

    https://learn.microsoft.com/en-us/fabric/data-engineering/library-management#install-workspace-libraries

    --

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

  2. VR 0 Reputation points
    2024-08-12T20:12:05.0533333+00:00

    Konstantinos,

    Thanks for your time. I was able to install the semantic-link in a notebook:

    • %%pyspark
    • !pip install semantic-link

    How do I make the library show up in my new environment. I am not able to do that

    VR

    0 comments No comments

  3. Konstantinos Passadis 19,586 Reputation points MVP
    2024-08-12T20:42:30.8733333+00:00

    Hello @VR

    I suggest to srt thr Default Environment :

    User's image

    ALSO :

    Find the Environment in the Workspace and if the library is not there yu can add it , but if it i part of another package no need to do that . Just remember to SAVE and PUBLISH , it takes some time !

    User's image

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

  4. VR 0 Reputation points
    2024-08-13T00:05:30.12+00:00

    Thanks. I had the runtime version set as 1.1 before. I did not see the option for libraries. So i changed it to 1.2. I still do not see the "Libraries" option in the Workspace settings as you do:

    Dflt Env 1.1

    Dflt Env 1.2

    Not sure what I am missing :(

    0 comments No comments

  5. Konstantinos Passadis 19,586 Reputation points MVP
    2024-08-13T13:53:59.0566667+00:00

    Hello @VR !

    have you activated the correct License Model ?

    User's image

    https://learn.microsoft.com/en-us/fabric/data-engineering/create-and-use-environment

    It explains everything about Environments how to !

    Also try from the Admin Portal and see if any setting there is relevant and disabled

    For example the ability to assign access to Workspaces

    Finally make sure the Capacity Trial is used and assign the Workspace to the Capacity Trial:

    User's image

    User's image

    --

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

Your answer

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