Forum Discussion
Python Integration Error
I was able to fix this issue by using pip to uninstall matplotlib and pillow and then reinstall them. That is:
pip uninstall matplotlib pip uninstall pillow
pip uninstall numpy pip install matplotlib pip install pillow
pip install numpy
- Echicken075 years agoFrequent Visitor
I've been at this for 3 days and couldn't figure it out.
Kept getting the same error messages as the following cases:
1. https://community.powerbi.com/t5/Desktop/Microsoft-PowerBI-Scripting-Python-Exceptions/td-p/850714
It wasn't until I ran the following uninstall and reinstall scripts in CMD that it FINALLY worked!! You are a life saver. Thank you so much.
- AMM6 years agoFrequent Visitor
I of course tried this then tried to create a python visualization or at least print("Hello") and I got the following error:
ImportError: DLL load failed: The specified module could not be found.
The default imports seem to be: os, uuid, matplotlib
Then later numpy as np
I'll submit another frown, but to say it didn't just work would be an understatement. I did test that I could use matplotlib, numpy, pandas etc. in Jupyter notebook even seaborn.
I ran your suggested installs and uninstalls in the order you suggested from the command line built into JupyterLab FWIW.
Cheers,
- bclrk6 years agoAdvocate II
You may have already tried this but a pip uninstall and install of numpy and any other packages in the error could help.
- AMM6 years agoFrequent Visitor
Of course I tried reinstalling months ago, but I did it again. Seaborn still does not work maybe I should use pip on that but I persisted with some test code as I got a different error after reinstalling numpy. I didn't use any PowerBI integration but I was able to use this code:
from matplotlib import pyplot as plt import numpy as np def sinplot(flip = 1): x = np.linspace(0, 14, 100) for i in range(1, 5): plt.plot(x, np.sin(x + i * .5) * (7 - i) * flip) sinplot() plt.show()To get below so thanks, but
- mficco4 years agoFrequent Visitor
This worked for me! Thanks!
- Anonymous4 years agoNot applicable
Thank you!
- nlashakhoori3 years agoNew Member
I am new to python, where shall i run this code ?
- AMM3 years agoFrequent Visitor
It has been a while since I installed Python, I'll have to update it to start the year, but I believe you run pip at the command prompt, it would be the shell in Unix/Mac OS X, but I think in Windows you run it from the command prompt or perhaps from Anaconda Prompt. I was suprised to start the new year with a question from this old thread. Many Power BI updates have come out since this fix.