Forum Discussion

nerminyehia's avatar
nerminyehia
Frequent Visitor
10 months ago
Solved

Fabric Python Notebook Custom Library

Hi, I’m trying to create a custom library and import it into a Python notebook (not a PySpark notebook), but it seems this isn’t currently supported in the Fabric portal. Is there a workaround to...
  • OnurOz's avatar
    10 months ago

    Hi Nermin,

     

    You can upload your wheel file (.whl) to the workspace or Lakehouse and install it in your notebook code using %pip install /lakehouse/default/Files/<your_wheel.whl>. This is a quick method, but it means the install runs at the beginning of every session.

     

    Currently, Microsoft Fabric Python notebooks (non-PySpark) allow you to use custom libraries by uploading a wheel (.whl) file and installing it manually using pip within the notebook, but there is no official, streamlined way to natively register and reuse custom libraries as you might expect in more traditional environments.

     

    Check this video out: https://youtu.be/JPyLTwSbdt8

     

    Hope that helps.

    Onur


    😊 If this post helped you, feel free to give it some Kudos! 👍

    ✅ And if it answered your question, please mark it as the accepted solution.