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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
jaryszek
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.