Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I wish to use the funtions in semantic link labs in a PySpark notebook which will be an activity within a Fabric pipeline;
So, to start here is the notebook, please excuse the distracting commented-out lines where I have been experimenting. I am running the code inside the notebook, no pipeline involved at this stage, and it works fine. Note (highlighted) default environment and %pip install.
If I run this inside a pipeline I get this error;
Fair enough, I need to work around the %pip install command which I can't use in this context. So after some googling I have loaded the semantic link labs library into an environment as a public library.
Now I change my notebook to use the new environment and remove the %pip install command;
When I run the pipeline again I get this error;
If I run %pip list the library is indeed loaded.
It seems that I simply don't understand how to reference it in my notebook.
Now that the library is loaded into the environment do I also need to run an import command? If so, what is the name of the thing I need to import? If I don't need to import in the notebook then what would the correct syntax be for the command "
Solved! Go to Solution.
even from custom environment you need to import the library in notebook
import sempy_labs as labs
Hi @davidfabricdev ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thanks and regards
Hi @davidfabricdev ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If your query has not been resolved yet, please share the requested details, so we can take a look.
Thank you.
May I ask if you have resolved this issue? If not, Kindly share the requested details so we can take a depper look into the issue. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
even from custom environment you need to import the library in notebook
import sempy_labs as labs
Hi @davidfabricdev ,
Thanks for reaching out to the Microsoft fabric community forum.
Could you please click on the error code 2451 which will redirect you to the error details page and share it with us here, with that information I will try to check for any troubleshooting steps or possible workarounds.
Thank you
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Fabric update to learn about new features.