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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
linriss_nr
Advocate I
Advocate I

Unable to set Python home directory

I'm currently attempting to set up my Power BI desktop instance up to work with Python, and on the advice of some Python tutorials am trying to use a Python virtual environment instead of the global Python install in order to avoid package dependency clashes.

 

- I have Python installed

- I have created a Python virtual environment and installed pandas and matplotlib within it

- I am not using Anaconda (for which there is apparently a known issue)

 

When I open Power BI and go to the Python Scripting page in the options, Power BI will not let me browse for a Python home directory, or type a path directly into the "Set a Python home directory" box.

 

Instead of the normal Windows Explorer browse window, I get what looks like a legacy browse window that only shows the Desktop folder.  I cannot interact with this browse window to actually browse the folders (i.e. I can't open Desktop to see what's in it).

 

I also cannot edit the Set a "Python Home Directory" box - I can put the cursor in there, but can't type anything.

 

I've searched online and can't see any solutions for this - any help would be greatly appreciated, because at the moment I'm stuck at square one with Python and Power BI.

 

Strange browser window when trying to set Python Home Directory - does not actually allow folder browsingStrange browser window when trying to set Python Home Directory - does not actually allow folder browsing

 

Side note - I don't know if this is helpful, but I get exactly the same behaviour on the "R Scripting" options page if I try to set an R home directory.

1 ACCEPTED SOLUTION
linriss_nr
Advocate I
Advocate I

Further update, following some additional research:

 

It turns out that this behaviour can affect various applications, and is caused by an error with OneDrive.

I followed the following advice found in this microsoft answers post to stop syncing my Desktop folder with OneDrive, and it resolved the issue in Power BI for me:

 

- Right-click the OneDrive icon in the Notification area and click Settings.
- Select the Backup tab, and click Manage Backup
- In the Manage folder backup dialog, click on the Stop backup link for "Desktop"
- Click Stop backup in the confirmation dialog that appears.

 

I now have full access to the files and folders on my PC when trying to set the Python Home Directory.

View solution in original post

2 REPLIES 2
linriss_nr
Advocate I
Advocate I

Further update, following some additional research:

 

It turns out that this behaviour can affect various applications, and is caused by an error with OneDrive.

I followed the following advice found in this microsoft answers post to stop syncing my Desktop folder with OneDrive, and it resolved the issue in Power BI for me:

 

- Right-click the OneDrive icon in the Notification area and click Settings.
- Select the Backup tab, and click Manage Backup
- In the Manage folder backup dialog, click on the Stop backup link for "Desktop"
- Click Stop backup in the confirmation dialog that appears.

 

I now have full access to the files and folders on my PC when trying to set the Python Home Directory.

linriss_nr
Advocate I
Advocate I

Update:  It turns out that I can actually browse using the browse window, but only within the Desktop folder in my OneDrive.  I can't go any further up the tree.  I can't therefore point to any other part of my OneDrive or C:\ drive apart from my Desktop.

 

I'm using Power BI Desktop from the Windows Store by the way, not downloaded from the Power BI website.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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