Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Team,
I am trying to use Python Visual from MS Power BI Desktop, I am getting below error while loading Python script from Get Data-> Python Script,
Same time i am also unable to install the Python libraries such Pandas and Matplotlib,
Kindly help us on this and support me to use the python visuals in power bi
thanks
M. Vijay Antony
Hi @VijayAntonyM ,
Based on the error information, python script leads to the error.
please try the following methods:
1.Intall python and enable python scripting.
Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn
2.Create the python script.
import pandas as pd
data = [['Alex',10],['Bob',12],['Clarke',13]]
df = pd.DataFrame(data,columns=['Name','Age'])
print (df)
3.Select get data and choose Python script.
4.On the python script screen, paste the python script.
You can view the following documents to learn more about how to run python scripts in power bi desktop.
Run Python scripts in Power BI Desktop - Power BI | Microsoft Learn
Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
61 | |
52 | |
50 | |
36 | |
33 |
User | Count |
---|---|
84 | |
71 | |
55 | |
45 | |
43 |