Skip to content

Cannot use virtual environment outside workspace in VSCode notebooks #25175

Closed as not planned

Description

@JasonMendoza2008

This is a bug I cannot wrap my head around, Visual Studio Code does not let me choose a virtual environment outside my workspace when using notebooks. I should first mention that everything works perfectly on PyCharm notebook Professional Edition (but I prefer VSCode's way of using notebooks) so it's not a problem from my computer.

When I click on Select Kernel (top right of the notebook screen), I only see my two base Python environments. Both work. I would however like to use one of my virtual environment. So I used the >Python: Select Interpreter option because in the Select Kernel, it does not let me enter a custom path:
enter image description here

Here, it's easy for me to find the path/to/python.exe of my virtual environment (I'm on Python 3.12.5) by clicking on Enter interpreter path:
enter image description here

However, when I click and locate path/to/python.exe, nothing happens.
enter image description here

There is still, in the notebook, the Select Kernel button saying that I have not selected any Python environment for my notebook. And when I click on it, my virtual environment that I previously selected does not appear. Only my base Python versions appear.

Things I did:

  • I restarted my computer.
  • I uninstalled VSCode, and reinstalled VSCode.
  • I looked for Windows Updates.
  • I looked for VSCode Updates. None were found.
  • I installed ipykernel to my virtual environment but it was already installed.
  • I made sure I had the Python extension enabled on VSCode.
  • I made sure I had the jupyter extension enabled on VSCode.
  • I made sure the base environments worked as expected when choosing them in Select Kernel. They did.
  • I made sure everything worked with my virtual environments in PyCharm Professional. They did.
  • I used python3 -m ipykernel install --user --name=projectname after activating my venv.
  • I tried to do >Jupyter: create interactive Window so that kernel will connect to the Python environment automatically and then try to see if clicking on Select Kernel would make the venv appear. It doesn't work. It appears in my interactive window, but not in my notebook.
  • I tried to clear the cache:
    Image

Does this issue occur when all extensions are disabled?:
No because I need the Jupyter extension and the Python extension. If I don't have those extensions enabled, another issue happens: I can't use notebooks at all but that's a normal issue.

Version: 1.98.0 (user setup)
Commit: 6609ac3d66f4eade5cf376d1cb76f13985724bcb
Date: 2025-03-04T21:06:18.612Z
Electron: 34.2.0
ElectronBuildId: 11044223
Chromium: 132.0.6834.196
Node.js: 20.18.2
V8: 13.2.152.36-electron.0
OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

  1. Make a venv (do not use conda) outside your workspace.
  2. Try to use it in a notebook.

Activity

  1. changed the title [-]Cannot use virtual environment outside workspace for notebooks[/-] [+]Cannot use virtual environment outside workspace in VSCode notebooks[/+] on Mar 9, 2025
  2. JasonMendoza2008 commented on Mar 9, 2025

    @JasonMendoza2008
    Author
  3. DonJayamanne commented on Mar 28, 2025

    @DonJayamanne

    Please could you enable logging as follows:

    • Open settings & go into Jupyter->Logging
    • Change the value to trace
    • Reload VS Code,
    • Attempt to repro the issue & then copy the output from the Jupyter output panel (use the command Jupyter: Show Output to get to the logs).
  4. JasonMendoza2008 commented on Mar 29, 2025

    @JasonMendoza2008
    Author

    Here are the logs:

    Visual Studio Code (1.98.2, undefined, desktop)
    Jupyter Extension Version: 2025.2.0.
    Python Extension Version: 2025.2.0.
    Pylance Extension Version: 2025.3.2.
    Platform: win32 (x64).
    Home = c:\Users\lhott
    Temp Storage folder ~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2025.2.0
    No workspace folder opened.
    12:22:40.684 [debug] Start refreshing Kernel Picker (1743247360684)
    12:22:40.701 [debug] Get Custom Env Variables, Class name = Tm, completed in 17ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
    12:22:40.701 [debug] Jupyter Paths kernels: 
    12:22:40.705 [debug] Kernel Spec Root Paths, ~\AppData\Roaming\jupyter\kernels, c:\ProgramData\jupyter\kernels
    12:22:41.876 [trace] Kernel Spec for 'Python 3 (ipykernel)' (~\AppData\Roaming\jupyter\kernels\python3\kernel.json) is hidden. (isDefaultKernelSpec = true, language = python, registrationInfo = undefined)
    12:22:41.877 [warn] No interpreter with path ~\virtualenv\saga3.12\Scripts\python.exe found in Python API, will convert Uri path to string as Id ~\virtualenv\saga3.12\Scripts\python.exe
    12:22:41.877 [warn] No interpreter with path ~\AppData\Local\Programs\Python\Python312\python.exe found in Python API, will convert Uri path to string as Id ~\AppData\Local\Programs\Python\Python312\python.exe
    12:22:42.323 [trace] Python API env change detected, add => 'C:\Users\~\AppData\Local\Programs\Python\Python310\python.exe'
    12:22:42.323 [trace] Search for KernelSpecs in Interpreter ~\AppData\Local\Programs\Python\Python310\python.exe
    12:22:42.336 [trace] Python API env change detected, add => 'C:\Users\~\AppData\Local\Programs\Python\Python312\python.exe'
    12:22:42.336 [trace] Search for KernelSpecs in Interpreter ~\AppData\Local\Programs\Python\Python312\python.exe
    12:22:42.339 [debug] KernelProvider switched kernel to id = .jvsc74a57bd05b721603ff8387185323cc100253576196f652c9a64b46e23180995801a95126.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.-m#ipykernel_launcher
    12:22:42.340 [debug] start the kernel, options.disableUI=true for Untitled-1.ipynb
    12:22:42.356 [trace] Registering commtarget jupyter.widget
    12:22:42.357 [debug] Controller selection change completed
    12:22:42.364 [info] Starting Kernel (Python Path: ~\AppData\Local\Programs\Python\Python312\python.exe, Unknown, 3.12.5) for 'Untitled-1.ipynb' (disableUI=true)
    12:22:42.364 [trace] Creating raw notebook for resource 'Untitled-1.ipynb'
    12:22:42.437 [trace] Search for KernelSpecs in Interpreter ~\AppData\Local\Programs\Python\Python312\python.exe
    12:22:42.441 [trace] Python API env change detected, add => 'C:\Users\~\virtualenv\saga3.12\Scripts\python.exe'
    12:22:42.441 [trace] Search for KernelSpecs in Interpreter ~\virtualenv\saga3.12\Scripts\python.exe
    12:22:42.446 [debug] Launching kernel .jvsc74a57bd05b721603ff8387185323cc100253576196f652c9a64b46e23180995801a95126.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.-m#ipykernel_launcher for Untitled-1.ipynb in ~\AppData\Local\Programs\Microsoft VS Code with ports 9001, 9000, 9004, 9002, 9003
    12:22:42.455 [trace] Python API env change detected, add => 'C:\Users\~\virtualenv\DL\Scripts\python.exe'
    12:22:42.455 [trace] Search for KernelSpecs in Interpreter ~\virtualenv\DL\Scripts\python.exe
    12:22:42.491 [trace] Hiding default KernelSpec python for interpreter ~\virtualenv\saga3.12\Scripts\python.exe (KernelSpec file ~\virtualenv\saga3.12\share\jupyter\kernels\python3\kernel.json)
    12:22:42.533 [debug] Get Custom Env Variables, Class name = Tm, completed in 1ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
    12:22:42.533 [debug] Get Custom Env Variables, Class name = Tm, completed in 1ms, has a truthy return value, Arg 1: "Untitled-1.ipynb", Arg 2: "RunPythonCode"
    12:22:42.537 [trace] Hiding default KernelSpec python for interpreter ~\virtualenv\DL\Scripts\python.exe (KernelSpec file ~\virtualenv\DL\share\jupyter\kernels\python3\kernel.json)
    12:22:42.537 [debug] End refreshing Kernel Picker (1743247360684)
    12:22:42.585 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 53ms
    12:22:42.586 [debug] Create ProcessService, Class name = _m (started execution), Arg 1: undefined
    12:22:42.586 [debug] Get Custom Env Variables, Class name = Tm, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunNonPythonCode", Arg 3: undefined
    12:22:42.586 [debug] Create ProcessService, Class name = _m, completed in 0ms, has a truthy return value, Arg 1: undefined
    12:22:42.590 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");"
    12:22:42.591 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 59ms
    12:22:42.616 [trace] Conda file is conda
    12:22:42.617 [trace] USER_SITE for ~\AppData\Local\Programs\Python\Python312\python.exe is c:\Users\~\AppData\Roaming\Python\Python312\Scripts
    12:22:42.617 [trace] Prepend PATH with user site path for ~\AppData\Local\Programs\Python\Python312\python.exe, user site c:\Users\~\AppData\Roaming\Python\Python312\Scripts
    12:22:42.617 [trace] Prepend PATH with python bin for ~\AppData\Local\Programs\Python\Python312\python.exe
    12:22:42.617 [trace] Prepend PATH with user site path for ~\AppData\Local\Programs\Python\Python312\python.exe, user site c:\Users\~\AppData\Roaming\Python\Python312\Scripts
    12:22:42.617 [trace] Prepend PATH with python bin for ~\AppData\Local\Programs\Python\Python312\python.exe
    12:22:42.617 [debug] Getting activated env variables, Class name = Cd, completed in 85ms, has a truthy return value, Arg 1: undefined, Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe", Arg 3: undefined
    12:22:42.617 [debug] Getting activated env variables, Class name = Cd, completed in 85ms, has a truthy return value, Arg 1: "Untitled-1.ipynb", Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe", Arg 3: undefined
    12:22:42.620 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m pip list
    12:22:42.623 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
    12:22:42.627 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2025.2.0-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 13216
        > cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2025.2.0-win32-x64\pythonFiles\vscode_datascience_helpers
    12:22:42.695 [trace] Got a response of 1716 for INITIALIZE_INTERRUPT:0
    12:22:42.699 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v3c8b8c14c7e77ddd4c8a97b00e5231ffb239439d7.json
        > cwd: ~\AppData\Local\Programs\Microsoft VS Code
    12:22:42.699 [debug] Kernel process 27328.
    12:22:42.928 [trace] ipykernel version & path 6.29.4, ~\AppData\Roaming\Python\Python312\site-packages\ipykernel\__init__.py for ~\AppData\Local\Programs\Python\Python312\python.exe
    12:22:43.419 [debug] Waiting for Raw Session to be ready in postStartRawSession
    12:22:43.419 [debug] Waiting for Raw session to be ready, status: connected
    12:22:43.419 [trace] Raw session connected
    12:22:43.419 [debug] Waited for Raw session to be ready & got status: connected
    12:22:43.419 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
    12:22:43.419 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
    12:22:43.419 [debug] Sending request for kernelInfo
    12:22:43.420 [debug] Kernel output 27328: To connect another client to this kernel, use:
    --existing c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v3c8b8c14c7e77ddd4c8a97b00e5231ffb239439d7.json
    12:22:43.499 [debug] Interpreter for Pylance for Notebook URI "Untitled-1.ipynb" is ~\AppData\Local\Programs\Python\Python312\python.exe
    12:22:43.505 [trace] Got response for requestKernelInfo
    12:22:43.505 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 86ms
    12:22:43.506 [trace] Executing silently Code (idle) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
    12:22:43.511 [trace] Executing silently Code (completed) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys with 1 output(s)
    12:22:43.512 [trace] Started running kernel initialization for Untitled-1.ipynb
    12:22:43.512 [trace] Executing silently Code (idle) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy
    12:22:43.563 [trace] Executing silently Code (completed) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy with 1 output(s)
    12:22:43.563 [trace] Determined IPyWidgets Version as 8
    12:22:43.563 [trace] Version of IPyWidgets 8 determined after 1.207s
    12:22:43.564 [trace] Executing silently Code (idle) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None):
    12:22:43.571 [trace] Executing silently Code (completed) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None): with 0 output(s)
    12:22:43.571 [debug] Requesting Kernel info
    12:22:43.571 [trace] Got Kernel info
    12:22:43.571 [trace] End running kernel initialization, now waiting for idle
    12:22:43.572 [trace] Waiting for idle on (kernel): 08b53d29-8837-4a1b-86d6-a6e10bfc879d -> idle
    12:22:43.572 [trace] Finished waiting for idle on (kernel): 08b53d29-8837-4a1b-86d6-a6e10bfc879d -> idle
    12:22:43.572 [trace] End running kernel initialization, session is idle
    12:22:43.572 [trace] Registering Kernel Completion Provider from kernel Python 3.12.5 for language python
    12:22:43.573 [trace] IPyWidgetScriptSource.initialize
    12:22:43.573 [info] Kernel successfully started
    12:22:43.574 [debug] getDataDirsImpl, Class name = Or (started execution), Arg 1: "Untitled-1.ipynb", Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe"
    12:22:43.574 [debug] Get Custom Env Variables, Class name = Tm, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
    12:22:43.574 [debug] Jupyter Paths : 
    12:22:43.579 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2025.2.0-win32-x64\pythonFiles\printJupyterDataDir.py
    12:22:43.627 [debug] getDataDirsImpl, Class name = Or, completed in 53ms, has a truthy return value, Arg 1: "Untitled-1.ipynb", Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe", Return Value: <Uri:/C:/Users/~/AppData/Roaming/Python/share/jupyter>, <Uri:/C:/Users/~/AppData/Roaming/jupyter>, <Uri:/C:/Users/~/AppData/Local/Programs/Python/Python312/share/jupyter>, <Uri:/C:/ProgramData/jupyter>
    12:22:44.091 [trace] Web view is ready to receive widget messages
    12:22:44.092 [trace] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
    12:22:44.092 [trace] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
    12:22:44.099 [trace] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2025.2.0-win32-x64/temp/scripts/e3e96a416d7d952e3a2e8cce8bc4a0dd8a5f0bc58edd1c0d6631080c2e9d8f30/jupyter
    12:22:44.099 [trace] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
    12:22:44.099 [trace] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
    12:22:44.099 [trace] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2025.2.0-win32-x64/temp/scripts/e3e96a416d7d952e3a2e8cce8bc4a0dd8a5f0bc58edd1c0d6631080c2e9d8f30/jupyter
    12:22:44.170 [error] Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch
  5. JasonMendoza2008 commented on Mar 29, 2025

    @JasonMendoza2008
    Author

    And to give more information, using VSCode with "normal" .py files works perfectly well with those same virtual environments:

    Image
  6. DonJayamanne commented on Mar 29, 2025

    @DonJayamanne

    Please can you take a screenshot of the python environments after you check ‘Select kernel-> Python env’

    Based on the logs, it should show up
    Please do share the logs after you’ve taken a screenshot as well

    Oh yes, the kernel picker doesn’t let you enter paths to the python env, as that’s a feature explicitly provided by the python extension, hence you’d need to use the approach you’ve mentioned

  7. added
    bugIssue identified by VS Code Team member as probable bug
    info-neededIssue requires more information from poster
    on Mar 29, 2025
  8. JasonMendoza2008 commented on Mar 29, 2025

    @JasonMendoza2008
    Author

    They actually appear for half a millisecond, cf. video (you have to go frame by frame to see it, it's very fast)

    2025-03-29.16-19-35.mp4

    Logs:

    Visual Studio Code (1.98.2, undefined, desktop)
    Jupyter Extension Version: 2025.2.0.
    Python Extension Version: 2025.2.0.
    Pylance Extension Version: 2025.3.2.
    Platform: win32 (x64).
    Home = c:\Users\lhott
    Temp Storage folder ~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2025.2.0
    No workspace folder opened.
    16:22:13.934 [debug] Start refreshing Kernel Picker (1743261733934)
    16:22:13.952 [debug] Get Custom Env Variables, Class name = Tm, completed in 18ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
    16:22:13.952 [debug] Jupyter Paths kernels: 
    16:22:13.955 [debug] Kernel Spec Root Paths, ~\AppData\Roaming\jupyter\kernels, c:\ProgramData\jupyter\kernels
    16:22:15.143 [trace] Kernel Spec for 'Python 3 (ipykernel)' (~\AppData\Roaming\jupyter\kernels\python3\kernel.json) is hidden. (isDefaultKernelSpec = true, language = python, registrationInfo = undefined)
    16:22:15.144 [warn] No interpreter with path ~\virtualenv\saga3.12\Scripts\python.exe found in Python API, will convert Uri path to string as Id ~\virtualenv\saga3.12\Scripts\python.exe
    16:22:15.144 [warn] No interpreter with path ~\AppData\Local\Programs\Python\Python312\python.exe found in Python API, will convert Uri path to string as Id ~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:15.579 [trace] Python API env change detected, add => 'C:\Users\~\AppData\Local\Programs\Python\Python310\python.exe'
    16:22:15.580 [trace] Search for KernelSpecs in Interpreter ~\AppData\Local\Programs\Python\Python310\python.exe
    16:22:15.594 [trace] Python API env change detected, add => 'C:\Users\~\AppData\Local\Programs\Python\Python312\python.exe'
    16:22:15.595 [trace] Search for KernelSpecs in Interpreter ~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:15.598 [debug] KernelProvider switched kernel to id = .jvsc74a57bd05b721603ff8387185323cc100253576196f652c9a64b46e23180995801a95126.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.-m#ipykernel_launcher
    16:22:15.598 [debug] start the kernel, options.disableUI=true for Untitled-1.ipynb
    16:22:15.615 [trace] Registering commtarget jupyter.widget
    16:22:15.616 [debug] Controller selection change completed
    16:22:15.637 [info] Starting Kernel (Python Path: ~\AppData\Local\Programs\Python\Python312\python.exe, Unknown, 3.12.5) for 'Untitled-1.ipynb' (disableUI=true)
    16:22:15.637 [trace] Creating raw notebook for resource 'Untitled-1.ipynb'
    16:22:15.687 [trace] Search for KernelSpecs in Interpreter ~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:15.695 [trace] Python API env change detected, add => 'C:\Users\~\virtualenv\saga3.12\Scripts\python.exe'
    16:22:15.695 [trace] Search for KernelSpecs in Interpreter ~\virtualenv\saga3.12\Scripts\python.exe
    16:22:15.699 [debug] Launching kernel .jvsc74a57bd05b721603ff8387185323cc100253576196f652c9a64b46e23180995801a95126.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.c:\Users\~\AppData\Local\Programs\Python\Python312\python.exe.-m#ipykernel_launcher for Untitled-1.ipynb in ~\AppData\Local\Programs\Microsoft VS Code with ports 9001, 9000, 9004, 9002, 9003
    16:22:15.713 [trace] Python API env change detected, add => 'C:\Users\~\virtualenv\DL\Scripts\python.exe'
    16:22:15.714 [trace] Search for KernelSpecs in Interpreter ~\virtualenv\DL\Scripts\python.exe
    16:22:15.762 [trace] Hiding default KernelSpec python for interpreter ~\virtualenv\saga3.12\Scripts\python.exe (KernelSpec file ~\virtualenv\saga3.12\share\jupyter\kernels\python3\kernel.json)
    16:22:15.770 [debug] Get Custom Env Variables, Class name = Tm, completed in 1ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
    16:22:15.770 [debug] Get Custom Env Variables, Class name = Tm, completed in 1ms, has a truthy return value, Arg 1: "Untitled-1.ipynb", Arg 2: "RunPythonCode"
    16:22:15.771 [trace] Hiding default KernelSpec python for interpreter ~\virtualenv\DL\Scripts\python.exe (KernelSpec file ~\virtualenv\DL\share\jupyter\kernels\python3\kernel.json)
    16:22:15.772 [debug] End refreshing Kernel Picker (1743261733934)
    16:22:15.851 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 82ms
    16:22:15.852 [debug] Create ProcessService, Class name = _m (started execution), Arg 1: undefined
    16:22:15.852 [debug] Get Custom Env Variables, Class name = Tm, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunNonPythonCode", Arg 3: undefined
    16:22:15.852 [debug] Create ProcessService, Class name = _m, completed in 0ms, has a truthy return value, Arg 1: undefined
    16:22:15.855 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");"
    16:22:15.856 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 87ms
    16:22:15.880 [trace] Conda file is conda
    16:22:15.882 [trace] USER_SITE for ~\AppData\Local\Programs\Python\Python312\python.exe is c:\Users\~\AppData\Roaming\Python\Python312\Scripts
    16:22:15.882 [trace] Prepend PATH with user site path for ~\AppData\Local\Programs\Python\Python312\python.exe, user site c:\Users\~\AppData\Roaming\Python\Python312\Scripts
    16:22:15.882 [trace] Prepend PATH with python bin for ~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:15.883 [trace] Prepend PATH with user site path for ~\AppData\Local\Programs\Python\Python312\python.exe, user site c:\Users\~\AppData\Roaming\Python\Python312\Scripts
    16:22:15.883 [trace] Prepend PATH with python bin for ~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:15.883 [debug] Getting activated env variables, Class name = Cd, completed in 114ms, has a truthy return value, Arg 1: undefined, Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe", Arg 3: undefined
    16:22:15.883 [debug] Getting activated env variables, Class name = Cd, completed in 114ms, has a truthy return value, Arg 1: "Untitled-1.ipynb", Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe", Arg 3: undefined
    16:22:15.886 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m pip list
    16:22:15.889 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
    16:22:15.893 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2025.2.0-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 39316
        > cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2025.2.0-win32-x64\pythonFiles\vscode_datascience_helpers
    16:22:15.959 [trace] Got a response of 1828 for INITIALIZE_INTERRUPT:0
    16:22:15.964 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v33858547574eb11275ada0b1ea492e6879a1190f9.json
        > cwd: ~\AppData\Local\Programs\Microsoft VS Code
    16:22:15.964 [debug] Kernel process 30696.
    16:22:16.192 [trace] ipykernel version & path 6.29.4, ~\AppData\Roaming\Python\Python312\site-packages\ipykernel\__init__.py for ~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:16.591 [debug] Kernel output 30696: To connect another client to this kernel, use:
    --existing c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v33858547574eb11275ada0b1ea492e6879a1190f9.json
    16:22:16.617 [debug] Waiting for Raw Session to be ready in postStartRawSession
    16:22:16.617 [debug] Waiting for Raw session to be ready, status: connected
    16:22:16.617 [trace] Raw session connected
    16:22:16.617 [debug] Waited for Raw session to be ready & got status: connected
    16:22:16.617 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
    16:22:16.617 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
    16:22:16.617 [debug] Sending request for kernelInfo
    16:22:16.661 [debug] Interpreter for Pylance for Notebook URI "Untitled-1.ipynb" is ~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:16.679 [trace] Got response for requestKernelInfo
    16:22:16.679 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 62ms
    16:22:16.680 [trace] Executing silently Code (idle) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
    16:22:16.683 [trace] Executing silently Code (completed) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys with 1 output(s)
    16:22:16.683 [trace] Started running kernel initialization for Untitled-1.ipynb
    16:22:16.684 [trace] Executing silently Code (idle) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy
    16:22:16.724 [trace] Executing silently Code (completed) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy with 1 output(s)
    16:22:16.724 [trace] Determined IPyWidgets Version as 8
    16:22:16.724 [trace] Version of IPyWidgets 8 determined after 1.109s
    16:22:16.724 [trace] Executing silently Code (idle) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None):
    16:22:16.731 [trace] Executing silently Code (completed) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None): with 0 output(s)
    16:22:16.731 [debug] Requesting Kernel info
    16:22:16.731 [trace] Got Kernel info
    16:22:16.731 [trace] End running kernel initialization, now waiting for idle
    16:22:16.732 [trace] Waiting for idle on (kernel): 1b1252d4-7287-4fee-a84e-21ee508452d1 -> idle
    16:22:16.732 [trace] Finished waiting for idle on (kernel): 1b1252d4-7287-4fee-a84e-21ee508452d1 -> idle
    16:22:16.732 [trace] End running kernel initialization, session is idle
    16:22:16.732 [trace] Registering Kernel Completion Provider from kernel Python 3.12.5 for language python
    16:22:16.733 [trace] IPyWidgetScriptSource.initialize
    16:22:16.733 [info] Kernel successfully started
    16:22:16.734 [debug] getDataDirsImpl, Class name = Or (started execution), Arg 1: "Untitled-1.ipynb", Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe"
    16:22:16.734 [debug] Get Custom Env Variables, Class name = Tm, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
    16:22:16.734 [debug] Jupyter Paths : 
    16:22:16.738 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2025.2.0-win32-x64\pythonFiles\printJupyterDataDir.py
    16:22:16.766 [debug] getDataDirsImpl, Class name = Or, completed in 32ms, has a truthy return value, Arg 1: "Untitled-1.ipynb", Arg 2: "~\\AppData\\Local\\Programs\\Python\\Python312\\python.exe", Return Value: <Uri:/C:/Users/~/AppData/Roaming/Python/share/jupyter>, <Uri:/C:/Users/~/AppData/Roaming/jupyter>, <Uri:/C:/Users/~/AppData/Local/Programs/Python/Python312/share/jupyter>, <Uri:/C:/ProgramData/jupyter>
    16:22:17.248 [trace] Web view is ready to receive widget messages
    16:22:17.249 [trace] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
    16:22:17.249 [trace] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
    16:22:17.312 [trace] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2025.2.0-win32-x64/temp/scripts/e3e96a416d7d952e3a2e8cce8bc4a0dd8a5f0bc58edd1c0d6631080c2e9d8f30/jupyter
    16:22:17.312 [trace] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
    16:22:17.312 [trace] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
    16:22:17.312 [trace] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2025.2.0-win32-x64/temp/scripts/e3e96a416d7d952e3a2e8cce8bc4a0dd8a5f0bc58edd1c0d6631080c2e9d8f30/jupyter
    16:22:17.383 [error] Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch
    16:22:23.797 [debug] Controller startUsingPythonInterpreter:'.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher' for view = 'jupyter-notebook' is no longer a valid
    16:22:23.797 [debug] Controller startUsingPythonInterpreter:'.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher (Interactive)' for view = 'interactive' is no longer a valid
    16:22:23.797 [warn] Disposing old controller startUsingPythonInterpreter:'.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher' for view = 'jupyter-notebook'
    16:22:23.797 [debug] Disposing controller .jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher associated with connection .jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher 
    16:22:23.797 [trace] Deleting controller '.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher' associated with view jupyter-notebook from registration as it was disposed
    16:22:23.797 [warn] Disposing old controller startUsingPythonInterpreter:'.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher (Interactive)' for view = 'interactive'
    16:22:23.797 [debug] Disposing controller .jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher (Interactive) associated with connection .jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher 
    16:22:23.797 [trace] Deleting controller '.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher (Interactive)' associated with view interactive from registration as it was disposed
    16:22:23.798 [trace] Python API env change detected, remove => 'C:\Users\~\virtualenv\saga3.12\Scripts\python.exe'
    16:22:23.798 [debug] Start refreshing Kernel Picker (1743261743798)
    16:22:23.799 [debug] Controller startUsingPythonInterpreter:'.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher' for view = 'jupyter-notebook' is no longer a valid
    16:22:23.799 [debug] Controller startUsingPythonInterpreter:'.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher (Interactive)' for view = 'interactive' is no longer a valid
    16:22:23.799 [warn] Disposing old controller startUsingPythonInterpreter:'.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher' for view = 'jupyter-notebook'
    16:22:23.799 [debug] Disposing controller .jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher associated with connection .jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher 
    16:22:23.799 [trace] Deleting controller '.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher' associated with view jupyter-notebook from registration as it was disposed
    16:22:23.799 [warn] Disposing old controller startUsingPythonInterpreter:'.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher (Interactive)' for view = 'interactive'
    16:22:23.799 [debug] Disposing controller .jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher (Interactive) associated with connection .jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher 
    16:22:23.799 [trace] Deleting controller '.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher (Interactive)' associated with view interactive from registration as it was disposed
    16:22:23.799 [trace] Python API env change detected, remove => 'C:\Users\~\virtualenv\DL\Scripts\python.exe'
    16:22:23.800 [warn] The following kernels use interpreters that are no longer valid or not recognized by Python extension, Kernels startUsingLocalKernelSpec:'id=.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher'(interpreterId='~\virtualenv\saga3.12\Scripts\python.exe'),startUsingPythonInterpreter:'id=.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher'(interpreterId='~\virtualenv\saga3.12\Scripts\python.exe'),startUsingPythonInterpreter:'id=.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher'(interpreterId='~\virtualenv\DL\Scripts\python.exe') and valid interpreter ids include C:\Users\~\AppData\Local\Programs\Python\Python310\python.exe, C:\Users\~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:23.800 [debug] Local Python connection deleted startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher: (interpreter id=~\virtualenv\saga3.12\Scripts\python.exe)',startUsingPythonInterpreter:'.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher: (interpreter id=~\virtualenv\saga3.12\Scripts\python.exe)',startUsingPythonInterpreter:'.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher: (interpreter id=~\virtualenv\DL\Scripts\python.exe)'
    16:22:23.800 [debug] Controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher' for view = 'jupyter-notebook' is no longer a valid
    16:22:23.800 [debug] Controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive)' for view = 'interactive' is no longer a valid
    16:22:23.800 [warn] Disposing old controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher' for view = 'jupyter-notebook'
    16:22:23.800 [debug] Disposing controller .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher associated with connection .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher 
    16:22:23.801 [trace] Deleting controller '.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher' associated with view jupyter-notebook from registration as it was disposed
    16:22:23.801 [warn] Disposing old controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive)' for view = 'interactive'
    16:22:23.801 [debug] Disposing controller .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive) associated with connection .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher 
    16:22:23.801 [trace] Deleting controller '.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive)' associated with view interactive from registration as it was disposed
    16:22:23.801 [debug] End refreshing Kernel Picker (1743261743798)
    16:22:24.811 [debug] Interpreter removed C:\Users\~\virtualenv\saga3.12\Scripts\python.exe
    16:22:24.811 [debug] Interpreter removed C:\Users\~\virtualenv\DL\Scripts\python.exe

    The last two lines are probably the problem?

  9. JasonMendoza2008 commented on Mar 29, 2025

    @JasonMendoza2008
    Author

    This is the first time I noticed that they appear for half a second actually, sorry for not mentioning it earlier but as you can see in the video it's very fast.

  10. Th3RandyMan commented on Jun 9, 2025

    @Th3RandyMan

    I'm having the same issue, but my venv appears for nearly a second. I've been trying to select it before it disappeared, but I don't think I'm fast enough.

  11. Th3RandyMan commented on Jun 9, 2025

    @Th3RandyMan

    I was able to fix the issue by changing the path to the environment file and reloading the window. Listed as "Python: Env File" in the settings.

  12. DonJayamanne commented on Jun 13, 2025

    @DonJayamanne

    Karthik Nadig (@karthiknadig)
    Based on the logs the last entry in Jupyter extension is as follows
    First line is the message from the Python extnsion API (via events)

    I.e. Python extension is sending a message about removing the environments.
    As a result Jupyter extension doesn't display them, after all, there's no such env from Jupyter ext perspective.

    16:22:23.799 [trace] Python API env change detected, remove => 'C:\Users\~\virtualenv\DL\Scripts\python.exe'
    16:22:23.800 [warn] The following kernels use interpreters that are no longer valid or not recognized by Python extension, Kernels startUsingLocalKernelSpec:'id=.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher'(interpreterId='~\virtualenv\saga3.12\Scripts\python.exe'),startUsingPythonInterpreter:'id=.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher'(interpreterId='~\virtualenv\saga3.12\Scripts\python.exe'),startUsingPythonInterpreter:'id=.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher'(interpreterId='~\virtualenv\DL\Scripts\python.exe') and valid interpreter ids include C:\Users\~\AppData\Local\Programs\Python\Python310\python.exe, C:\Users\~\AppData\Local\Programs\Python\Python312\python.exe
    16:22:23.800 [debug] Local Python connection deleted startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher: (interpreter id=~\virtualenv\saga3.12\Scripts\python.exe)',startUsingPythonInterpreter:'.jvsc74a57bd02518103b9b9439786289370c6e73a83a133f5dedc95711b213680e4bd71a82af.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-m#ipykernel_launcher: (interpreter id=~\virtualenv\saga3.12\Scripts\python.exe)',startUsingPythonInterpreter:'.jvsc74a57bd0ccfd54959d18f7cff148e62bc419f7081a46ab5d3373871d47f8515a16874ec5.c:\Users\~\virtualenv\DL\Scripts\python.exe.c:\Users\~\virtualenv\DL\Scripts\python.exe.-m#ipykernel_launcher: (interpreter id=~\virtualenv\DL\Scripts\python.exe)'
    16:22:23.800 [debug] Controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher' for view = 'jupyter-notebook' is no longer a valid
    16:22:23.800 [debug] Controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive)' for view = 'interactive' is no longer a valid
    16:22:23.800 [warn] Disposing old controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher' for view = 'jupyter-notebook'
    16:22:23.800 [debug] Disposing controller .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher associated with connection .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher 
    16:22:23.801 [trace] Deleting controller '.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher' associated with view jupyter-notebook from registration as it was disposed
    16:22:23.801 [warn] Disposing old controller startUsingLocalKernelSpec:'.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive)' for view = 'interactive'
    16:22:23.801 [debug] Disposing controller .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive) associated with connection .undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher 
    16:22:23.801 [trace] Deleting controller '.undefined.-xfrozen_modules=off.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.c:\Users\~\virtualenv\saga3.12\Scripts\python.exe.-xfrozen_modules=off#-m#ipykernel_launcher (Interactive)' associated with view interactive from registration as it was disposed
    16:22:23.801 [debug] End refreshing Kernel Picker (1743261743798)
    16:22:24.811 [debug] Interpreter removed C:\Users\~\virtualenv\saga3.12\Scripts\python.exe
    16:22:24.811 [debug] Interpreter removed C:\Users\~\virtualenv\DL\Scripts\python.exe
    
  13. DonJayamanne commented on Jun 13, 2025

    @DonJayamanne

    JasonMendoza2008
    I'm sorry for never getting back to you on this issue, somehow this slipped through the cracks.
    I've had a look and identified the problem, for some reason the env is marked as removed by the Python extension API.
    Hence transferring to this repo.
    Once again apologies for the delay.

  14. JasonMendoza2008 commented on Jun 14, 2025

    @JasonMendoza2008
    Author

    Don Jayamanne (@DonJayamanne) Thanks, no worries. Thank you for transferring.

  15. eleanorjboyd commented on Dec 8, 2025

    @eleanorjboyd

    Hello! We are now rolling out a new extension, the Python Environments extension, which we built to improve all environment related items for Python. Could you give this new extension a try and see if it fixes the issue for you? Info on how to enable it can be found here: microsoft/vscode-python-environments#581. Thanks!

  16. github-actions commented on Jan 8, 2026

    @github-actions

    Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

    Happy Coding!

  17. DmtkD commented on Sep 23, 2026

    @DmtkD

    Hello, Eleanor Boyd (@eleanorjboyd), Don Jayamanne (@DonJayamanne)
    I have occurred with this issue.
    The behavior is the same like in description

    Here is my setup

    Version: 1.138.0 (user setup)
    Commit: 7debcd0e2acdea1c52de81bf9ee1620444407dda
    Date: 2026-09-15T07:24:32Z
    Electron: 42.10.0
    ElectronBuildId: 15109253
    Chromium: 148.0.7778.280
    Node.js: 24.18.1
    V8: 14.8.178.38-electron.0
    @github/copilot: 1.0.84-4
    @github/copilot-sdk: 1.0.13
    OS: Windows_NT x64 10.0.26200

    Extension version via command code --list-extensions --show-versions

    azganoth.pixel-icons@1.5.0
    dart-code.dart-code@3.142.0
    dart-code.flutter@3.142.0
    docker.docker@0.18.0
    github.github-vscode-theme@6.3.5
    github.vscode-pull-request-github@0.166.1
    mhutchie.git-graph@1.30.0
    ms-azuretools.vscode-containers@2.5.2
    ms-azuretools.vscode-docker@2.0.0
    ms-python.debugpy@2026.6.0
    ms-python.pylint@2026.6.0
    ms-python.python@2026.4.0
    ms-python.vscode-pylance@2026.4.1
    ms-python.vscode-python-envs@1.36.0
    ms-toolsai.datawrangler@1.24.2
    ms-toolsai.jupyter@2025.9.1
    ms-toolsai.jupyter-keymap@1.1.2
    ms-toolsai.jupyter-renderers@1.3.0
    ms-toolsai.vscode-jupyter-cell-tags@0.1.9
    ms-toolsai.vscode-jupyter-slideshow@0.1.6
    ms-vscode-remote.remote-wsl@0.104.3
    redhat.vscode-yaml@1.24.0
    zhuangtongfa.material-theme@3.20.2```

    Workaround:

    Disable to use Python Environments Extension in setting: python.useEnvironmentsExtension

  18. DmtkD commented on Sep 23, 2026

    @DmtkD

    Is it possible to reopen this issue, or would it be better to open a new one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions