The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
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.
Solved! Go to Solution.
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.
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.
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
77 | |
72 | |
47 | |
39 |
User | Count |
---|---|
138 | |
108 | |
69 | |
64 | |
57 |