Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi Everyone,
Trying to run Python in PBI Desktop for the first time. How many times i give the value in IDE it does not hold.
I keep getting an error , not sure if this is related
I am able to open VS Code IDE from PBI visualization
what ever way, i keep getting this error
DataSource.Error: ADO.NET: Python script error.
<pi>Traceback (most recent call last):
File "C:\Users\namburi\PythonScriptWrapper_3baf4a97-3db7-47be-bf27-6c91ee2f54e8\PythonScriptWrapper.PY", line 3, in <module>
matplotlib.use('Agg')
^^^^^^^^^^^^^^
AttributeError: module 'matplotlib' has no attribute 'use'
</pi>
Details:
DataSourceKind=Python
DataSourcePath=Python
Not sure what is the issue, if any one can help, it would be helpful
Regards,
K
Hi @knamburi ,
For such issues, try launching the Power BI Desktop executable from the Anaconda prompt after running the Python script's environment.
You can refer to the following blog and similar solutions.
Solved: Power BI Python ADO.NET: Python Script Error - Microsoft Fabric Community
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |