microsoft / microsoft/vscode-python-environments

Visual Studio Code failed to recognize default python interpreter path

Open
#1,363 21 comments 5 reactions 1 assignee View on GitHub

@eleanorjboyd is already working on this.

Since Mar 16, 2026.

triage-needed
Dominant language
TypeScript
Stars
138
Forks
62
Avg merge
1d 4h
Merged PRs (30d)
35

Description

I have set the default python interpreter path in the User Settings JSON file but VS Code reported Could not resolved interpreter path

Image

I have verified the python interpreter path is correct:

Image

I suspected that was because VS Code detected that I did not setup pyenv init in my .zshrc file.

Image

I did NOT execute pyenv init - zsh in the .zshrc file because it slows down the initialization of zsh. Instead I initialized the pyenv environment in .zshrc as follows:

export PYENV_ROOT=~/.pyenv
export PATH=$PYENV_ROOT/shims:$PATH
export PATH=$PYENV_ROOT/plugins/pyenv-virtualenv/shims:$PATH

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.