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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
obriaincian
Resolver I
Resolver I

Error when executing python script

Error

Details: "ADO.NET: Python script error.
<pi>Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 2, in <module>
import os, pandas, matplotlib
ModuleNotFoundError: No module named 'pandas'
</pi>"

 

I have imported data into PowerBi, I am now trying to execute some python script on the imported data, but I get the above error.

 

Please note that I have installed both numpy and pandas through the pip install function in cmd.

Also note that I am not using anaconda, I have installed python directly on my machine (most of the threads I've looked at reference solutions that are to do with Anaconda).

 

Thanks

 

 

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @obriaincian 

 

Please refer to the following link, hope it can help you.

https://community.powerbi.com/t5/Desktop/Running-Python-Script-inside-Power-BI/m-p/2556896#M904670 

https://community.powerbi.com/t5/Desktop/Error-when-connecting-python-to-PBI/m-p/593716#M281855 

https://community.powerbi.com/t5/Desktop/Now-able-to-run-python-script/m-p/610764#M291099 

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.