Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
VoltesDev
Helper V
Helper V

Need guide: PySpark (Fabric runtime)

Hello good people,

 

I have requirement in my Fabric Notebook to read Excel file put in Lakehouse. And my Fabric now is in Trial Mode.

 

The requirement, is to use "msparkutils" and I start it with importing the feature, as per usual : "import mssparkutils"

But I'm getting this error:

ModuleNotFoundError Traceback (most recent call last) Cell In[8], line 1 ----> 1 import mssparkutils  ModuleNotFoundError: No module named 'mssparkutils'

 

When "consult " with ChatGpt, it is saying that I need to create the notebook from Lakehouse, but I did create New notebook from my Lakehouse. and it is saying the Session supposed to be "PySpark (Fabric runtime)" while mine is "PySpark (Python)"

 

VoltesDev_0-1745759766115.png

May I know what is the real problem ?

May I know what I need to do regarding this  ?

Thanks,

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
suparnababu8
Super User
Super User

Hi @VoltesDev 

 

mssparkutlis has been officially renamed to NotebookUtils. Pls look on below snapshot

suparnababu8_0-1745766005754.png

Read full article from here: NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn 

It  helps you reolve your issue.

 

Thank you!!

 

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

View solution in original post

5 REPLIES 5
burakkaragoz
Community Champion
Community Champion

Hi @VoltesDev ,

The issue you're facing is due to the notebook session type. The msparkutils module is only available when your notebook is running under the "PySpark (Fabric runtime)" session—not the standard "PySpark (Python)" session.

Here's what you can do:

  1. Switch the Session Type:

    • In your notebook, look at the top where it says "PySpark (Python)".
    • Click on it and change it to "PySpark (Fabric runtime)".
    • If you don’t see that option, it might be because:
      • You're not in a Lakehouse-attached notebook, or
      • Your trial environment doesn’t support the Fabric runtime yet.
  2. Ensure You're in a Lakehouse Context:

    • Open your Lakehouse.
    • From there, click “New Notebook” directly inside the Lakehouse.
    • This ensures the notebook is properly linked and the Fabric runtime is available.
  3. Trial Mode Limitation:

    • Some trial environments may have limited runtime options. If the Fabric runtime is not available, you might need to request access or wait until it’s enabled for your tenant.

Let me know if you want help checking your environment or switching the session!

Anonymous
Not applicable

Hi @VoltesDev,

I wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.
If the community member's answer your query, please mark it as "Accept as Solution" and select "Yes" if it was helpful.
If you need any further assistance, feel free to reach out.

Please continue using Microsoft community forum.

Thank you,
Pavan.

Anonymous
Not applicable

Hi @VoltesDev,

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 my response has addressed your query, please "Accept  as  Solution" and give a 'Kudos' so other members can easily find it.

Thank you,
Pavan.

Anonymous
Not applicable

Hi @VoltesDev,

Thank you for reaching out in Microsoft Community Forum.

Thank you @suparnababu8    for the helpful response.

As suggested by suparnababu8,  I hope this information was helpful. Please let me know if you have any further questions or you'd like to discuss this further. If this answers your question, please "Accept as Solution" and give it a 'Kudos' so others can find it easily.

Please continue using Microsoft community forum.

Regards,
Pavan.

suparnababu8
Super User
Super User

Hi @VoltesDev 

 

mssparkutlis has been officially renamed to NotebookUtils. Pls look on below snapshot

suparnababu8_0-1745766005754.png

Read full article from here: NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn 

It  helps you reolve your issue.

 

Thank you!!

 

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

Announcements
August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.