[英]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.