Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode doesn't show poetry virtualenvs in select interpreter option #89182

Closed
jaepil-choi opened this issue Jan 23, 2020 · 1 comment
Closed
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@jaepil-choi
Copy link

jaepil-choi commented Jan 23, 2020

  • 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:

  1. Install & set up a poetry environment as explained in the official documentation.
  2. 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.

@sbatten
Copy link
Member

sbatten commented Jan 23, 2020

Based on your description, it seems this issue should be filed with the python extension directly. The setting you have modified to workaround this as suggested in the linked issue belongs to the python extension.

@sbatten sbatten closed this as completed Jan 23, 2020
@sbatten sbatten added the *caused-by-extension Issue identified to be caused by an extension label Jan 23, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

2 participants