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

the same conda environment listed 3 times in kernel picker #12207

Closed
amunger opened this issue Nov 29, 2022 · 8 comments
Closed

the same conda environment listed 3 times in kernel picker #12207

amunger opened this issue Nov 29, 2022 · 8 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) notebook-kernel-picker upstream-python Blocked on upstream Python Ext verified Verification succeeded
Milestone

Comments

@amunger
Copy link
Contributor

amunger commented Nov 29, 2022

Testing #11963

after creating a conda env in the workspace and reloading vscode a few times, and disabling the mru kernel picker, I see the same environment listed multiple times:
image

jupyterlogs.txt

@DonJayamanne
Copy link
Contributor

@amunger i think its only dispalyed 2 times, not three.
if you look at the screen shot, the second item is 2.
Please confirm

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Nov 29, 2022
@amunger
Copy link
Contributor Author

amunger commented Nov 29, 2022

1st, 3rd and 4th are the same, the third is just a relative path where the others are fully qualified

@DonJayamanne
Copy link
Contributor

@amunger please could you:

  • Replicate this again
  • Create the conda env again and ensure you capture the logs
  • When you get the duplicates as well i need the logs (if you happen to reload vscode)

The logs you have provided aren't sufficient as it doesnlt contain the logs from when you created the conda env.
I believe you may have reloaded vscode in between (ie reloaded after creating the env)

@rebornix rebornix removed their assignment Nov 30, 2022
@amunger
Copy link
Contributor Author

amunger commented Nov 30, 2022

note - the MRU kernel picker was used to create the environment and does not show duplicates. Switching back to the old kernel picker will show the duplicates. (C:\SRC\TEST\6.CONDA\PYTHON.EXE in this repro)
environment creation jupyterlogs.txt
kernel picker duplicates jupyterlogs2.txt
environment creation pythonLogs.txt

@DonJayamanne
Copy link
Contributor

Switching back to the old kernel picker will show the duplicates. (C:\SRC\TEST\6.CONDA\PYTHON.EXE in this repro)
environment creation jupyterlogs.txt

how did you create the conda env, did you do this manually via the CLI or via the python extension commands

@amunger
Copy link
Contributor Author

amunger commented Nov 30, 2022

how did you create the conda env

with the MRU kernel picker: Select another kernel... -> Python Environments -> Create python environment -> conda

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Nov 30, 2022

Found the problem, sometimes the Uri (path to the executable) is upper cased and in other cases its not upper cased.
Here are two different values returned by the Python extension for the same request

Upstream bug microsoft/vscode-python#20300

debug 09:31:08.170: Get Active Interpreter, Class name = x, completed in 56ms, has a truthy return value, Arg 1: "/c:/src/test/6", Return Value: {"id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE","sysPrefix":"c:\\src\\test\\6\\.conda","envPath":{"$mid":1,"path":"/c:/src/test/6/.conda","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/src/test/6/.conda","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\src\\test\\6\\.conda\\python.exe","_sep":1,"path":"/c:/src/test/6/.conda/python.exe","scheme":"file"},"displayName":"","envType":"Conda","version":{"major":3,"minor":8,"patch":15,"raw":"3.8.15 (default, Nov 24 2022, 14:38:14) [MSC v.1916 64 bit (AMD64)]"}}


debug 09:30:57.943: Get Active Interpreter, Class name = x, completed in 39ms, has a truthy return value, Arg 1: undefined, Return Value: {"id":"C:\\SRC\\TEST\\6\\.CONDA\\PYTHON.EXE","sysPrefix":"c:\\src\\test\\6\\.conda","envPath":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"},"displayPath":{"$mid":1,"path":"/c:/SRC/TEST/6/.CONDA","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\SRC\\TEST\\6\\.CONDA\\python.exe","_sep":1,"path":"/c:/SRC/TEST/6/.CONDA/python.exe","scheme":"file"},"displayName":"","envType":"Conda","version":{"major":3,"minor":8,"patch":15,"raw":"3.8.15 (default, Nov 24 2022, 14:38:14) [MSC v.1916 64 bit (AMD64)]"}}

@DonJayamanne DonJayamanne added upstream-python Blocked on upstream Python Ext bug Issue identified by VS Code Team member as probable bug kernel-picker and removed info-needed Issue requires more information from poster labels Nov 30, 2022
@DonJayamanne DonJayamanne added this to the December 2022 milestone Nov 30, 2022
@rebornix rebornix added notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) notebook-kernel-picker and removed kernel-picker labels Dec 9, 2022
@DonJayamanne
Copy link
Contributor

@amunger this should be fixed in the latest pre-release version of Jupyter and Python extensxions.
Please re-open if the issue persists.

@DonJayamanne DonJayamanne added the author-verification-requested Issues potentially verifiable by issue author label Jan 9, 2023
@amunger amunger added the verified Verification succeeded label Jan 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) notebook-kernel-picker upstream-python Blocked on upstream Python Ext verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants