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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
HPauwelyn
Frequent Visitor

VS Code don't open as editor for Python scripts

I'll to make a Python script in Power BI as data source. That script I want to write in VS Code (Visual Studio Code). The default app for .py files is VS Code and at the settings of Power BI under "Python scripting", I've selected "Default OS program for .PY files".

image.png

But everythime I'll to create a Python script, this window occure instead of VS Code.

image.png

I'm also not able to open VS Code on another way. I've added the path to VS Code, in the hope it would work, but it didn't...

image.png

I'll use VS Code 'cause you've syntax highlighting and error messages etc.

3 REPLIES 3
Anonymous
Not applicable

I have same problem 

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @HPauwelyn ,

Have you read the guide docuement about running python script in Power BI Desktop?

Please refer to the steps in this document which gives an example for Visual Studio Code.

By default, Power BI Desktop will launch Visual Studio Code as the external Python IDE if it's installed on your local computer; if Visual Studio Code is not installed and you have Visual Studio, that will be launched instead. If neither of those Python IDEs is installed, the application associated with .PY files is launched.

Based on your screenshots, it seems that you may not install the Visual Studio Code as the external Python IDE on your local device.

Another reference: Use an external Python IDE with Power BI

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-piga-msft: The option Visual Studio Code doesn't appear at the "Detected Python IDEs".

image.png

This Python IDEs I've installed:

  • VS Code (OS default application for .py files)
  • VS Code Insiders
  • VS 2017
  • VS 2019
  • Notepad++

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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