When calling the API method to get the active interpreter we get the same environment, however sometimes the Uri (path to the executable is lower cased and sometimes its upper cased)
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)]"}}
When calling the API method to get the active interpreter we get the same environment, however sometimes the Uri (path to the executable is lower cased and sometimes its upper cased)
This causes issues in the Jupyter extension as the Uris are different values
Suggestion: Is it possible for Python to cache the Uri per Python Env Id, so that this never changes.
See here
All logs can be found here microsoft/vscode-jupyter#12207 (comment)