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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
jaryszek
Post Prodigy
Post Prodigy

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
Deku
Community Champion
Community Champion

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
Community Champion
Community Champion

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!

Hello,


I have installed :

jaryszek_0-1742546644081.png

 

 

Deku
Community Champion
Community Champion

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
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors