Skip to content

Visual Studio Code failed to recognize default python interpreter path #1363

@wyatt-wong

Description

@wyatt-wong

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 becuase it slows down the initialization of the zsh. Instead I initialized the pyenv environemnt in .zshrc as follows:

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

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions