microsoft / microsoft/vscode-python-environments

Visual Studio Code failed to recognize default python interpreter path

未关闭
#1,363 21 条评论 5 个 reaction 已指派 1 人 已被 @eleanorjboyd 认领 在 GitHub 查看
triage-needed
主要语言
TypeScript
星标
138
派生
62
平均合并
1 天 4 小时
30 天内合并 PR
35

描述

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
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。