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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Katre
New Member

Python Script in Power Query

Hello everyone,

I want to use Python in power query to transform data before create dashboard in Power BI. But I get "Access is denied" error. I installed Python and Pandas and check them in local, they work. I did all settings in Power BI. But i didn't run any python code in power query. I also checked this documentatine--> Use Python in Power BI Power Query Editor - Power BI | Microsoft Learn, but I still get same error.

Could you give me some advice to deal this issue?

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Katre ,

 

Here are the few suggestions for troubleshooting the problem -

1. Ensure that Python is installed correctly and the installation path is added to the system's PATH environment variable. You can verify this by opening a command prompt or terminal and typing python --version to see if Python is recognized.

2. Additionally you would need to install few modules to run a python Script in Power BI Deskopt which I have been using i.e. pandas, pyarrow, matplotlib.

3. Check the permissions of the folders where Power BI and Python are installed, as well as any folders where data sources are located or where Power BI saves temporary files. Ensure that you have the necessary permissions to access and modify these folders.

4. Double-check the Python environment configuration in Power BI to ensure that the correct Python executable path is specified. Go to "File" > "Options and settings" > "Options" > "Python scripting" in Power BI Desktop to verify the Python environment settings.

 

If you like my Solution consider giving a upvote..

 

Thank you!

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Katre ,

 

Here are the few suggestions for troubleshooting the problem -

1. Ensure that Python is installed correctly and the installation path is added to the system's PATH environment variable. You can verify this by opening a command prompt or terminal and typing python --version to see if Python is recognized.

2. Additionally you would need to install few modules to run a python Script in Power BI Deskopt which I have been using i.e. pandas, pyarrow, matplotlib.

3. Check the permissions of the folders where Power BI and Python are installed, as well as any folders where data sources are located or where Power BI saves temporary files. Ensure that you have the necessary permissions to access and modify these folders.

4. Double-check the Python environment configuration in Power BI to ensure that the correct Python executable path is specified. Go to "File" > "Options and settings" > "Options" > "Python scripting" in Power BI Desktop to verify the Python environment settings.

 

If you like my Solution consider giving a upvote..

 

Thank you!

 

 

Hi ShrutikGumate,

Thank you for your reply and advice. As you mentioned, I realized that I don't have some permisions of some folders  where Power BI and Python are installed. Thank you for your time.

 
 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors