Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I am running a python script on top of my dataset in power bi for anomaly detection. The script looks up a pre-trained model on my computer and applies it to the dataset in power bi. Below is the python script that is run in power bi.
The script runs fine and the dataset refreshes in power bi desktop, but when I publish to power bi service I get the following error when I try to setup schedule refresh.
ModuleNotFoundError: No module named 'matplotlib
I have checked my environment and I have the compatible version of matplotlib installed. I also have the personal gateway install on the same computer as the python files.
Any help would be greatly appreciated.
Thanks
Hi @shanecosgrove1 ,
The problem doesn't seem to be in Power BI, I found a similar post on the web, please check if the solution in the picture below helps you.
ImportError: No module named matplotlib.pyplot
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi. I guess I'm trying to understand here. Why would you even import matplotlib in a script? that's a visualization library that you can use in the visuals. You shouldn't include it in the script bringing the data.
You can check the libraries for visualizations in service in here: https://docs.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support#python-packag...
I hope removing that may fix it. If you need to use matplotlib in a visual you have to import it right there.
Happy to help!
Hi ,
I get the same error if I remove the import matplotlib line from the python code. They only reason I added it was to see if it would solve the problem but it doesn't matter if I include or exclude it i still get the same error in service.
When using python in power bi the environement needs Pandas and Matplotlib to be installed.
User | Count |
---|---|
38 | |
16 | |
13 | |
11 | |
9 |
User | Count |
---|---|
52 | |
31 | |
24 | |
18 | |
15 |