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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jaryszek
Memorable Member
Memorable Member

Python script error

Hi,

I am trying to run python script from Power BI.

I set up path to python within power bi:
C:\Users\User>where python
C:\Users\User\AppData\Local\Microsoft\WindowsApps\python.exe

 

and run example script:
import pandas as pd
data = [['Alex',10],['Bob',12],['Clarke',13]]
df = pd.DataFrame(data,columns=['Name','Age'])
print (df)

but i got error:

jaryszek_0-1742482770714.png

 

Can anybody help?
The purpose is to get windows environment variable.

Best,
Jacek

 

1 ACCEPTED SOLUTION

Some suggestions here


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

3 REPLIES 3
Deku
Super User
Super User

Have you pip installed those libraries in your environment?


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
jaryszek
Memorable Member
Memorable Member

Hello,


I have installed :

jaryszek_0-1742546644081.png

 

 

Some suggestions here


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.