pythondocker-composevscode-extensionswindows-subsystem-for-linuxvscode-devcontainer

Unable to recognise python interpreter path in vscode devcontainer


In wsl, python is not recognised in vscode's devcontainer interpreter settings.

The following were executed in order, but the paths were not recognised


Solution

  • The reason was that another container was specified for the service in devcontainer.json. After the fix. The interpreter is now the default and the interpreter path for the flask api container is automatically set. Incidentally, you have specified "python.defaultInterpreterPath":"/usr/bin/python" in devcontainer.json, but this setting does not seem to be seen. This issue has been resolved and we are done.