Skip to content

Invalid python interpreter path: /usr/local/bin/python #258

Description

@weikanglim

When using ghcr.io/devcontainers/features/python:1, the devcontainer opens up with an invalid python interpreter path /usr/local/bin/python.

When attempting to debug you get this error:
image

After clicking "Select Python interpreter", it shows the invalid path and a detected path:
image

Ctrl + P -> Open Remote Settings (JSON) shows the following settings under ~/.vscode-server/data/Machine:

{
	"python.defaultInterpreterPath": "/usr/local/bin/python",
	"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
	"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
	"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
	"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
	"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
	"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
	"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
	"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
	"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
}

I was able to create a minimal repro in https://github.com/weikanglim/devcontainer-python. I have full devcontainer build logs if needed.

Originally from Azure/azure-dev#922

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions