profile
viewpoint

Ask questionsThe Python path in your debug configuration is invalid.

<!-- Please search existing issues to avoid creating duplicates. -->

Environment data

  • VS Code version: 1.45.1
  • Extension version (available under the Extensions sidebar):2020.5.80290
  • OS and version: win10
  • Python version (& distribution if applicable, e.g. Anaconda): python-3.8.3-embed-amd64
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A

Expected behaviour

vscode can find python interpreter

Actual behaviour

vscode cann't found python interpreter

Steps to reproduce:

  1. download python-3.8.3-embed-amd64.zip and Unzip it

  2. write sample python code and use vscode opened it:

print(123)
  1. create launch.json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: cureent file",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "pythonPath": "e:/tools/re/python-3.8.3-embed-amd64/python.exe"
        },
    ]
}
  1. press f5 to debug it
  2. message fatal: image

sXc51RV7TZ

microsoft/vscode-python

Answer questions scalavision

I also encountered this, running the test from the file works fine, debugging the same test, vscode errors out with The Python path in your debug configuration is invalid, why isn't those paths the same as a default setting? Not sure I want to reinstall vscode atm. I can't find a way to set the pythonPath in the config. "pythonPath" shows up as not allowed.

How am I going to configure this?

useful!
source:https://uonfu.com/
Github User Rank List