我想在 vscode 槽 WSL 中使用由诗歌“创建”的 python 解释器,但正确的 python 版本没有出现在 vscode 中。
我在 WSL 终端中运行以下命令:
$ poetry shell
Spawning shell within /home/kwint/.cache/pypoetry/virtualenvs/metal-hub-python-py3.7
$ code .
在 vscode 中发现的唯一interperter 是/usr/
. 我尝试手动输入 virtualenv 的路径,但没有运气。这是返回的路径which python
:/home/kwint/.cache/pypoetry/virtualenvs/metal-hub-python-py3.7/bin/python