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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Importing seaborn package PowerBI error

Hello everyone,

 

I am currently working on a python coded project and have entered the final stage, visualization. I want to do this visualization through PowerBI. The packages I work with are Pandas, Numpy, Matplotlib and Seaborn. Whenever I try to import the seaborn package while entering my script in PowerBI, i get the following error:

 

Details: "ADO.NET: Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 11, in <module>
import seaborn as sns
ModuleNotFoundError: No module named 'seaborn'

 

I have no difficulty importing the other packages whatsoever. Yes I did install the seaborn package with my anaconda prompt (pip install seaborn). Whenever I try to install this package i get the message: "Requirement already satisfied". My python home directory is redirected to my anaconda map so I think that can't be the problem either. Right now, im out of ideas so any help is greatly appreciated.

 

Thank you in advance!

5 REPLIES 5
Anonymous
Not applicable

@Anonymous : Thanks, for your post. I'm having the same issue. Did you ever figure out how to use it? I already tried the things suggested in the post. I have pandas and seaborn in my script and both packages are located in the same place, but seaborn is not found. 

NRuecker_0-1614179068888.png

If you have it working, please let me know, which versions you are using. Thanks a lot!

V-pazhen-msft
Community Support
Community Support

@Anonymous 

As far as I know seaborn is supported. This is most likely a version problem, you may refer to the discussion in this post:

ModuleNotFoundError: No module named 'seaborn' in Python IDE - Stack Overflow

 

Paul Zheng _ Community Support Team

amitchandak
Super User
Super User

@Anonymous , I am assuming python is working with pandas. And only seaborn is not working

Try this once.

pip install --upgrade --force-reinstall seaborn

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hey, I've tried what you said and the forced reinstall worked, but PowerBI still doesn't seem to find the seaborn package.

@Anonymous , I able to add import after running above.

 

I already have these

pip install --upgrade --force-reinstall matplotlib

pip install --upgrade --force-reinstall numpy
pip install --upgrade --force-reinstall pandas

pip install -c conda-forge mkl-service
conda activate

 

And I ran this

pip install --upgrade --force-reinstall seaborn

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.