In vscode using Python, ctrl+F5 always asks for "select environment"

12,976

Solution 1

Run > Add Configuration... => Choose one of the two options.

After doing this it will no longer prompt you.

Solution 2

Ctrl+F5 is a shortcut to Start without Debugging What you want is just running a file according to your post. To run a python file in the integrated terminal, right-click your editor window and Run Python File in Terminal. It should open up a terminal window within VS Code and run as normal. It also takes into account the environment you are currently using whenever you run it.

To answer your other question about Python Experimental, it is an option to use the experimental debugger, an alternate version of a Python Debugger. You can read the instructions here

Share:
12,976
Admin
Author by

Admin

Updated on June 11, 2022

Comments

  • Admin
    Admin almost 2 years

    I installed VSCode, downloaded official Python 3.6.4.

    VSCode detected and set the environment right - I do see "python.pythonPath" user setting set correctly.

    But, when using VS Code using Ctrl+F5to run a Python file, I am always getting asked for "select environment" and it shows me two options - Python - Python Experimental

    What is this "Python Experimental"? How can I get rid of getting interrupted every time I try to run a script?