繁体   English   中英

vscode用诗歌和wsl找不到python

[英]vscode can't find python with poetry and wsl

我想在 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/中的interperter。 我尝试手动输入 virtualenv 的路径,但没有运气。 这是which python返回的路径: /home/kwint/.cache/pypoetry/virtualenvs/metal-hub-python-py3.7/bin/python

您可以手动将"python.pythonPath"指定为/home/kwint/.cache/pypoetry/virtualenvs/metal-hub-python-py3.7/bin/python或尝试将"python.venvPath"设置为/home/kwint/.cache/pypoetry/virtualenvs并且应该检测 Poetry 创建的所有虚拟环境。

另外,如果您想获得官方支持,请提出检测诗歌虚拟环境的功能请求

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM