-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support pyenv-win on Windows #15304
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
Comments
Thank you for the suggestion! We have marked this issue as "needs decision" to make sure we have a conversation about your idea. We plan to leave this feature request open for at least a month to see how many 👍 votes the opening comment gets to help us make our decision. |
I'd love to have this feature too. Meanwhile I created a separate extension for pyenv-win to have a quick working solution for me. But would be awesome to see this feature work in this package of course. https://github.com/vgibilmanno/vscode-winpyenv |
@vgibilmanno We have a experimental discovery component that supports this. Add this to your user settings to try it out:
And reload VS Code. |
@empz do you mind checking if Karthik's solution solves the issue for you? thanks! |
@karthiknadig I tried your solution but it doesn't work for me. In case it matters, I'm using the following version of the extension: v2021.3.680753044 |
@vgibilmanno Can you share the contents of |
@karthiknadig This is the output:
|
@vgibilmanno Can you check if you have any of the following environment variables set?
If so what is their value? |
PYENV: %USERPROFILE%.pyenv\pyenv-win\ PYENV_ROOT was not set. I manually set it to %USERPROFILE%.pyenv\pyenv-win\bin and restarted VS Code but it still doesn't detect pyenv. |
It worked. Though I don't know if setting the PYENV_HOME environment variable fixed it or because removing \ at the end. I tried deleting the PYENV_HOME and setting the \ to the PYENV variable again, but now VS Code always finds the pyenv interpreters (probably caches found locations?) |
@vgibilmanno We do some cashing. Can you share the value of USERPROFILE, and PYENV that you have? On windows we look at |
Closing this since the feature itself is now available under the |
Currently, the Python extension seems to rely on the
py
launcher installed by the official windows installers.I'm using pyenv-win to manage different python versions on my Windows machine and I wasn't able to make VS Code detect it, even though running
python
on my terminal worked perfectly. I've even tried setting explicitly thepython.defaultInterpreterPath
setting but that didn't work either.So, apart from the feature request. Is there a way to use the Python extension without having the py launcher available on
C:\Windows
The text was updated successfully, but these errors were encountered: