Open albireox opened 3 years ago
Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority.
Thanks for your understanding and patience!
Unfortunately I have not been able to reproduce the issue.
Can you clarify what you mean by base pyenv versions, is it the one you install via pyenv install xxx
? How are you creating the virtual environment?
Please set python.logging.level
to info
in User settings, reload the window and provide the logs as mentioned in the issue template.
Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
``` XXX ```
Closing this issue as no one else reported it, so we suspect it's user error. If you can provide me the info I'll be happy to reopen the issue.
I'm still seeing this issue. Yes, with "base" version I mean the pyenv version installed directly, e.g. if I run pyenv install 3.9.6
the base version would be 3.9.6
(I can do pyenv shell 3.9.6
). I can see all virtual environments. I create those using pyenv-virtualenv
. I can see other "system" Python version installed in /usr/bin
and /usr/local/bin
.
The log is below.
Thanks for the prompt response! Can you please show me the contents of /Users/albireo/.pyenv/versions/3.9.4
, does it have a valid python
binary? I'm still not able to reproduce it for myself as you can see here:
Also, I see you have opted out of certain experiments, can you send me your user settings?
Here's the output
$ ls /Users/albireo/.pyenv/versions/3.9.4
total 0
drwxr-xr-x 6 albireo staff 192 Apr 5 08:51 Python.framework/
lrwxr-xr-x 1 albireo staff 74 Apr 5 08:52 bin -> /Users/albireo/.pyenv/versions/3.9.4/Python.framework/Versions/Current/bin/
lrwxr-xr-x 1 albireo staff 74 Apr 5 08:51 bin.orig -> /Users/albireo/.pyenv/versions/3.9.4/Python.framework/Versions/Current/bin/
drwxr-xr-x 8 albireo staff 256 Apr 30 12:22 envs/
lrwxr-xr-x 1 albireo staff 78 Apr 5 08:49 include -> /Users/albireo/.pyenv/versions/3.9.4/Python.framework/Versions/Current/include/
lrwxr-xr-x 1 albireo staff 74 Apr 5 08:49 lib -> /Users/albireo/.pyenv/versions/3.9.4/Python.framework/Versions/Current/lib/
lrwxr-xr-x 1 albireo staff 76 Apr 5 08:49 share -> /Users/albireo/.pyenv/versions/3.9.4/Python.framework/Versions/Current/share/
There's a python
file in /Users/albireo/.pyenv/versions/3.9.4/bin/
One more thing that may be important, my default shell is fish
.
I do not see the python
file in the output you sent. Can you try running /Users/albireo/.pyenv/versions/3.9.4/bin/python
for me to make sure it exists?
$ ls /Users/albireo/.pyenv/versions/3.9.4/bin/python
lrwxr-xr-x 1 albireo staff 9 Apr 5 08:51 /Users/albireo/.pyenv/versions/3.9.4/bin/python -> python3.9*
Any idea why the python
binary did not show up in the output you sent here? https://github.com/microsoft/vscode-python/issues/16231#issuecomment-911133610 I'll be back in a hr.
I don't think the python
binary (or the link to it) shows up in the root of the pyenv version. I think it's supposed to be inside bin/
. It's the same with the virtual environments that do show up for me in VSCode.
$ ls /Users/albireo/.pyenv/versions/archon/
total 4.0K
drwxr-xr-x 95 albireo staff 3.0K Aug 22 21:33 bin/
drwxr-xr-x 2 albireo staff 64 Apr 5 08:53 include/
drwxr-xr-x 3 albireo staff 96 Apr 5 08:53 lib/
-rw-r--r-- 1 albireo staff 131 Apr 5 08:53 pyvenv.cfg
drwxr-xr-x 3 albireo staff 96 Apr 5 10:12 share/
I have prepared a special extension for you with more logging for this case (PR https://github.com/microsoft/vscode-python/pull/17792): https://github.com/microsoft/vscode-python/suites/4100306179/artifacts/104587927, use Extension: Install from VSIX
to install the VSIX and report back the logs again, thanks.
Thanks for looking into this. Here're the logs with the new version.
It seems you missed to set python.logging.level
to info
as mentioned here in the original instructions https://github.com/microsoft/vscode-python/issues/16231#issuecomment-910878659, can you please do that? Thank you for testing this.
Oh right, sorry about that. This looks more like it.
https://gist.github.com/albireox/0ee867abd2f8f8843c308ce0db40d10e
Great, I'll have a look. From my understanding I'm trying to find out why /Users/albireo/.pyenv/versions/3.9.4/bin/python
wasn't discovered.
Can you do the same with https://github.com/microsoft/vscode-python/suites/4101975410/artifacts/104650861? I do see /Users/albireo/.pyenv/versions/3.9.4/bin
in previous logs. In this VSIX, I'm trying to see if we ever look into that directory (or if we identify correctly that it's a directory).
Here's the new log.
https://gist.github.com/albireox/97f1ef5b3a34a6e278ffdb402deab78e
I have figured out the cause, thanks! It is because bin
directory is a symlink, and we only check if it's a directory before attempting to read it.
Some part of this issue was fixed with https://github.com/microsoft/vscode-python/pull/15451.
Awesome, thanks!
Gentle poke to see if there are any news or workarounds for this one.
Unfortunately there isn't any workaround right now, sorry. We haven't been able to prioritize this.
No worries and thanks for the reply!
Pinging again about this. As far as I can see it's still happening.
Just a note to say this is still happening. Any chance this can be prioritised at some point?
I'll take this on in the next debt week :) expect ETA 2 months
Bumping incase this can be resolved sometime soon 😅
Environment data
python.languageServer
setting: Pylance[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (
python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]Expected behaviour
Interpreter shows all pyenv base versions and virtual environments.
Actual behaviour
When I open the interpreter to select a Python version it shows all the virtual environment I have created in pyenv from the different base version, but not the base versions themselves. That is, I can select a virtual environment
XXX
based on3.7.6
but not3.7.6
itself.