Forum Discussion
Run R/Python scripts in PBI Power Query
Hi cmcknight,
I think the key point is that your screenshot looks like the new Power Query editor, which is still a preview in the September 2026 release. That editor does not always show the same ribbon buttons as the classic one, so the Run R script and Run Python script buttons may simply not be part of it yet.
Two things can hide those buttons, and it helps to check them in this order. The first is the preview feature for the new Power Query experience under File, Options and settings, Options, Preview features. The second is the scripting setup itself, because R and Python need a local installation that Power BI Desktop can find. The setup steps are in the R in Power Query Editor documentation
The Python equivalent is described in the Python in Power Query Editor documentation
So I would check it in this order
1. Options -> Preview features -> turn off the new Power Query experience -> restart Desktop
2. Open Power Query -> Transform tab -> Run R script and Run Python script back?
3. Options -> R scripting and Python scripting -> home directory detected?
4. Still missing -> update Desktop and check the install of R or Python
New Power Query editor (preview) -> fewer ribbon buttons -> scripts missingI am inferring the new editor from your screenshot, so please confirm whether you turned that preview on. If the buttons are still missing after switching back, the scripting setup is the next suspect. Until the new editor supports scripts, you can also keep the classic editor for any query that needs R or Python.
So I would turn off the new Power Query preview first, restart Desktop, and then check the scripting options if the buttons do not return. Please let us know what you find and mark a reply as the solution if it helps.
AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.