簡體   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