-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Description
- VSCode Version: 1.14.1
- OS Version:
Windows 10 pro, - 64bit (the latest)
PS C:\Users\Jaepil> [System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 18363 0
Steps to Reproduce:
- Install & set up a
poetry
environment as explained in the official documentation. - Try to look for available Python interpreters in the command palette. You won't see any.
I've left a detailed explanation on Stackoverflow.
However, the main point is that even though VSCode's official settings reference states that it has default python.poetryPath
set for poetry
, poetry-created environments' interpreters are not shown in 'Python: Select Interpreter'.
I've also tried adding python.venvPath": "~/.cache/pypoetry/virtualenvs"
, to my settings.json
as suggested in microsoft/vscode-python#8372 (comment) but to no avail. (I have to ask though. It seems that poetry's virtualenvs are located at ~\\AppData\\Local\\pypoetry\\Cache\\virtualenvs
, not ~/.cache/pypoetry/virtualenvs
. So why did the original issue suggested adding ~/.cache/pypoetry/virtualenvs
in the first place?)
I also tried an absolute path, by adding "python.venvPath": "C:\\Users\\Jaepil\\AppData\\Local\\pypoetry\\Cache\\virtualenvs"
, to the same settings, but it also doesn't work.
At this point, I think it's VSCode's bug that doesn't properly recognize venv's path.
Does this issue occur when all extensions are disabled?: Yes/No
99% Yes. Since Python is also an extension, this won't even run without Python extension enabled. However, any other extensions won't likely affect selecting Python interpreters.