You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: Select Interpreter doesn't list all pyenv interpreters #1281
Based on your comment on the other issue, we are detecting all of the intepreters installed by pyenv, just not the virtual environments you created with pyenv-virtualenv, correct?
The issue is that you're detecting all of the non-virtual interpreters and some of the virtual ones, when what I believe is expected is that all of both kinds would be listed. It seems to be arbitrarily excluding two of them in the example from that comment. All of them are pyenv-created and there's no difference in the way the listed one was created from the way the excluded ones were created (save for the name).
Hi, I've the same issue on mac.
When I've defined the python.venvPath on Settings->Python section, I could see the list of my venvs,
but from the last updates of VSCode, I can't get the venvs list from cmd+shift+P:Select Interpreter.
I get only the system installation, I have only virtualenv generated envs
Looking around I found that opening a terminal,
then activating a virtual env with "workon mypyenv"
and then start VSCode with "code -a ."
I can see the active virtual env on venvs list
Gbonline (@gbonline) That does sound frustrating, however I want to make sure not to confuse the issues, as the one I'm brining up is specifically pyenv-related (whereas it looks like you're using virtualenv-wrapper) and doesn't involve the venvPath setting. I might suggest filing a separate issue? Best of luck with your problem.
Roman Pearah (@neverfox)
I read that this issue was for pyenv, but when I started using VSCode for python, I looked for the virtualenv settings on VSCode and found to set the venvPath. Then it worked for the project I did in October. I could see all my venvs under the my venv common path. and also change venv clicking on the blue status bar on the bottom of the window app.
After the last updates of VSCode, this behavior disappeared and now I can see only the system python env
Roman Pearah (@neverfox) So you're saying we actually detect some of the virtual environments created using pyenv-virtualenv? I'm honestly surprised we pick up any without a configuration setting since we only pick up virtual environments in your workspace folder or if you have a Pipfile and so we know to go look for pipenv, hence why I want to make sure I understand exactly what is going on (GIF showing the issue would be awesome).
Roman Pearah (@neverfox) I did see it, but that window can be scrollable so it's non-obvious if that's the complete list or not.
Regardless, we think we might know the cause and fixed it in #1353 . If you have time, please try out the development build of the extension and see if this solves your problem.
Activity
brettcannon commentedon Apr 3, 2018
Based on your comment on the other issue, we are detecting all of the intepreters installed by pyenv, just not the virtual environments you created with pyenv-virtualenv, correct?
neverfox commentedon Apr 5, 2018
The issue is that you're detecting all of the non-virtual interpreters and some of the virtual ones, when what I believe is expected is that all of both kinds would be listed. It seems to be arbitrarily excluding two of them in the example from that comment. All of them are pyenv-created and there's no difference in the way the listed one was created from the way the excluded ones were created (save for the name).
gbonline commentedon Apr 6, 2018
Hi, I've the same issue on mac.
When I've defined the
python.venvPathon Settings->Python section, I could see the list of my venvs,but from the last updates of VSCode, I can't get the venvs list from cmd+shift+P:Select Interpreter.
I get only the system installation, I have only virtualenv generated envs
Looking around I found that opening a terminal,
then activating a virtual env with "
workon mypyenv"and then start VSCode with "
code -a ."I can see the active virtual env on venvs list
neverfox commentedon Apr 6, 2018
Gbonline (@gbonline) That does sound frustrating, however I want to make sure not to confuse the issues, as the one I'm brining up is specifically pyenv-related (whereas it looks like you're using virtualenv-wrapper) and doesn't involve the venvPath setting. I might suggest filing a separate issue? Best of luck with your problem.
gbonline commentedon Apr 7, 2018
Roman Pearah (@neverfox)
I read that this issue was for pyenv, but when I started using VSCode for python, I looked for the virtualenv settings on VSCode and found to set the venvPath. Then it worked for the project I did in October. I could see all my venvs under the my venv common path. and also change venv clicking on the blue status bar on the bottom of the window app.
After the last updates of VSCode, this behavior disappeared and now I can see only the system python env
brettcannon commentedon Apr 9, 2018
Gbonline (@gbonline) you're looking for #1192
brettcannon commentedon Apr 9, 2018
Roman Pearah (@neverfox) So you're saying we actually detect some of the virtual environments created using
pyenv-virtualenv? I'm honestly surprised we pick up any without a configuration setting since we only pick up virtual environments in your workspace folder or if you have aPipfileand so we know to go look for pipenv, hence why I want to make sure I understand exactly what is going on (GIF showing the issue would be awesome).neverfox commentedon Apr 10, 2018
Brett Cannon (@brettcannon) Yes, some are picked up and some aren't. Did you see the screenshot and pyenv output I posted in the other issue? My expectations here were somewhat set by George Leslie-Waksman (@gwax)'s experience.
brettcannon commentedon Apr 10, 2018
Roman Pearah (@neverfox) I did see it, but that window can be scrollable so it's non-obvious if that's the complete list or not.
Regardless, we think we might know the cause and fixed it in #1353 . If you have time, please try out the development build of the extension and see if this solves your problem.
neverfox commentedon Apr 10, 2018
Yeah, I thought you might wonder about that. I did scroll for sure and it's not complete. I will check out the dev build, thanks.
neverfox commentedon Apr 11, 2018
The alpha version appears to list all interpreters in pyenv. Now if there's ever a solution to #1167, pyenv users will be mostly set.