It's because there is an extra step needed - you need to explicitly install a Jupyter kernel that points to your new Python virtual environment. You can't simply activate Jupyter-lab or Notebook from the virtual environment. This has tripped me up before, too.

Follow the advice here: Using Jupyter notebooks with a virtual environment

And, in fact, there can be an issue where your kernel still doesn't point to the correct Python binary, in which case you need to change one suggestion in the above advice process:

From: ipython kernel install --user --name=projectname

To: python3 -m ipykernel install --user --name=projectname

where projectname is the name of the venv to use as the ipython kernel.

(This correction comes from a comment to Jupyter Notebook is loading incorrect Python kernel #2563.)

*and don't forget to restart VSCode

Answer from rocksteady on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › datascience › jupyter-kernel-management
Manage Jupyter Kernels in VS Code
November 3, 2021 - You can open the kernel picker by clicking on Select Kernel on the upper right-hand corner of your notebook or through the Command Palette with the Notebook: Select Notebook Kernel command.
Discussions

uv .venv and VS Code Jupyter Notebook: Connecting to Kernel
Hello and thanks for all the great work with uv! I was hoping to be able to use VS Code Jupyter notebooks with just uv to install Python. Loading the .venv works fine, but when running a code block, it is stuck in an infinite loop trying... More on github.com
🌐 github.com
11
August 27, 2024
No kernel dropdown when trying to run Jupyter in VSCode
I found the solution. I was using the open-source version of Visual Studio Code on my Linux-laptop, but it only works properly with the Microsoft version. This is because the OS-version does not use the same extensions due to not having access to the Microsoft extension "store". Swapped to the Microsoft-version, and all is good. More on reddit.com
🌐 r/learnpython
18
4
August 27, 2025
New Virtual environments not listed in Kernels until i reload VS Code
Run notebook, & view kernels Create virtual environment Close notebook, open a notebook, the new venv is not dipslayed in the kernel picker Need to reload More on github.com
🌐 github.com
17
March 25, 2021
VS Code does not find Python kernel - Stack Overflow
In Visual Studio code still, while ... (/path/to/venv/bin) will appear here, without having to add environments to the kernel lists. Once this environment is selected, the notebook should work as expected, I hope it helps. ... For some upgrading to the current jupyter extension may still not work I had to find the correct combination of vscode and jupyter ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Visual Studio Code
code.visualstudio.com › docs › datascience › jupyter-notebooks
Jupyter Notebooks in VS Code
November 3, 2021 - You can create a Jupyter Notebook ... or by creating a new .ipynb file in your workspace. Next, select a kernel using the kernel picker in the top right....
🌐
GitHub
github.com › astral-sh › uv › issues › 6672
uv .venv and VS Code Jupyter Notebook: Connecting to Kernel · Issue #6672 · astral-sh/uv
August 27, 2024 - Workspace folder ~\testing stuff, Home = c:\Users\USER 22:17:38.461 [info] Starting Kernel (Python Path: ~\testing stuff\.venv\Scripts\python.exe, Venv, 3.10.14) for '~\testing stuff\test.ipynb' (disableUI=true) 22:17:39.048 [info] Process Execution: ~\testing stuff\.venv\Scripts\python.exe -m pip list 22:17:39.060 [info] Process Execution: ~\testing stuff\.venv\Scripts\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)" 22:17:39.268 [info] Process Execution: ~\testing stuff\.venv\Scripts\python.exe -c "import
Author   wes-stone
🌐
Medium
medium.com › @marcio.debarros › a-seamless-transition-setting-up-virtual-environment-and-jupyter-notebooks-in-vs-code-6debf9078ddd
A Seamless Transition: Setting up Virtual Environment and Jupyter Notebooks in VS Code | by Marcio DeBarros | Medium
April 22, 2025 - For the longest time, for any Python experiment I wanted to do, I either went with PyCharm for standard Python projects or Jupyter Notebooks for Notebooks. This involved managing different Python versions with pyenv, using virtualenv to create virtual environments, and manually creating different kernels for Jupyter Notebooks.
🌐
Process Street
process.st › home › miscellaneous › how to setup a jupyter notebook in vs code (virtual env + kernels)
How To Setup a Jupyter Notebook in VS Code (Virtual Env + Kernels) | Process Street
June 18, 2024 - Type in & choose: “Create: New Jupyter Notebook” · Step 6.2: Choose your kernel · Open the VSCODE search bar: cmd+shift+p · Type in & choose: “Notebook: Select Notebook Kernel” · At the bottom of VSCode, you should see “Jupyter ...
Find elsewhere
🌐
Medium
medium.com › @temperancehong0 › add-venv-to-your-jupyter-kernel-with-vs-code-c91c36ae484e
Add .venv to your Jupyter Kernel with VS Code | by Temperancehong | Medium
August 7, 2025 - In the first line of argv, change python to your python.exe of your .venv · Try the kernel selector in your notebook again, with Jupyter Kernel, normally it will appear
🌐
Reddit
reddit.com › r/learnpython › no kernel dropdown when trying to run jupyter in vscode
r/learnpython on Reddit: No kernel dropdown when trying to run Jupyter in VSCode
August 27, 2025 -

Hi. I'm trying to run some code in a Jupyter notebook in VSCode. Whenever I try to do this, I get a pop up that asks me to select a kernel. I also see this is written on the top right of the window I'm in. The problem is that there is nothing in this dropdown menu, and I therefore cannot run anything.

I am running VSCode with the Python and Jupyter extensions installed. I've created a virtual environment and installed ipykernel. I've also tried to install jupyter to see if that helped, but it didn't. And yes, the environment is selected (by opening the menu in VSCode, selecting "Select Python interpreter" and picking the Python-binary in .venv). I've rebooted my machine and reinstalling the extensions, yet it does not solve the issue. Running normal python files works fine.

Any tips? Cheers.

🌐
Walquis
walquis.github.io › my-cheat-sheets › jupyter-notebooks › vscode-venv-setup.html
Jupyter - venv setup with VSCode - Cheat Sheets
In VSCode, Cmd-Shift-P, and search for "kernel". Choose "Kernel: Select Notebook Kernel". Now that ipykernel is installed, the .venv containing it will show up as a kernel; choose that. At this point, whatever you pip install into that activated .venv environment should be visible for import ...
🌐
Devinschumacher
devinschumacher.com › how-to-setup-jupyter-notebook-virtual-environment-vs-code-kernels
How To Setup Jupyter Notebook in VS Code (w/ Virtual Env & Kernels) | Devin Schumacher
September 20, 2022 - Open the VSCODE search bar: cmd+shift+p · Type in & choose: "Create: New Jupyter Notebook" Open the VSCODE search bar: cmd+shift+p · Type in & choose: "Notebook: Select Notebook Kernel" At the bottom of your VS Code window, you should see "Jupyter Server: Local" Click that, and a dropdown ...
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 5319
New Virtual environments not listed in Kernels until i reload VS Code · Issue #5319 · microsoft/vscode-jupyter
March 25, 2021 - Run notebook, & view kernels Create virtual environment Close notebook, open a notebook, the new venv is not dipslayed in the kernel picker Need to reload
Author   DonJayamanne
Top answer
1 of 11
16

Had to update the Jupyter extension, even though I had auto-update on.

2 of 11
8

I had a lot of problems myself in getting the updated list of jupyter kernel servers in old versions of Visual Studio code.

However, in the newer version of Visual Studio code (I am using version 1.76.2 on my ubuntu 18.04 machine; I hope this works also on Mac OS), you don't need to specify the jupyter kernel anymore: it is now enough to specify the python environment. This new feature and its use are described in this howto from visualstudio.

In short, once I installed the correct version of Visual Studio code, I performed the following steps:

  • I first make a virtual environment and install ipykernel in it:
virtualenv --python=python3 venv
. venv/bin.activate
pip3 install ipykernel
  • In Visual Studio code, while having opened a python file, I select using ctrl+shift+P (Shift+Command+P in Mac OS) the python interpreter (Python:Select Interpreter) and choose the one of the virtual environment that I have just created: /path/to/venv/bin/python. In my case, this step was necessary: indeed, I first had to choose the desired python interpreter on any python file before proceeding to the following step
  • In Visual Studio code still, while having opened a notebook file (.pynb file), I click on select kernel on the top right of the IDE, then click on "Python Environments": the environment I selected before for the python file (/path/to/venv/bin) will appear here, without having to add environments to the kernel lists. Once this environment is selected, the notebook should work as expected,

I hope it helps.

🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 9703
Kernel picker doesn't find venv installed ipykernels when setting 'defaultInterpreterPath' · Issue #9703 · microsoft/vscode-jupyter
April 18, 2022 - Notebooks (.ipynb files) Interactive Window and/or Cell Scripts (.py files with #%% markers) Installed kernels under venv don't show up in kernel pick list even after selecting venv as the main python interpreter. jupyter kernelspec list Available kernels: python3 /Users/username/workspace/repo/.vscode/src_python_twitter_ml_tfx__tfx/venv/share/jupyter/kernels/python3 src_python_twitter_ml_tfx__tfx /Users/gcasassaez/workspace/repo/.vscode/src_python_twitter_ml_tfx__tfx/venv/share/jupyter/kernels/src_python_twitter_ml_tfx__tfx ·
Author   casassg
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 4479
Jupyter: Select a Kernel command missing in Python Interactive context · Issue #4479 · microsoft/vscode-jupyter
January 25, 2021 - Notice that command palette willl not contain Jupyter: Select a Kernel command. However, top right of interactive window will show UI for selecting different kernel on remote notebook server.
Author   mparq
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 4147
cannot switch kernel in vscode ipynb interface · Issue #4147 · microsoft/vscode-jupyter
December 4, 2020 - Type of virtual environment used (N/A | venv | virtualenv | conda | ...): miniconda3 -> conda 4.9.2 · Relevant/affected Python packages and their versions: n/a · Relevant/affected Python-related VS Code extensions and their versions: jupyter v2020.11.399280825 ... Using the kernel selector in the top right of the notebook interface changes the kernel used by the notebook
Author   lindacmsheard
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 2282
Cannot select a kernel for notebook if the previously used one has been deleted. · Issue #2282 · microsoft/vscode-jupyter
February 18, 2020 - Activate my_venv and pip install jupyter. Launch code pointed at that folder. Being paranoid, I always use "Python: Select interpreter" to ensure my_venv has been chosen. Create a new notebook file, "testnb.ipynb" - add and run a cell, make sure the my_venv Kernel actually starts.
Author   daragallagher
🌐
Visual Studio Code
code.visualstudio.com › docs › python › environments
Python environments in VS Code
November 3, 2021 - Jupyter notebooks do not use the Python Environments API for environment discovery. Instead, they rely on the older Python extension API. This means notebook kernel selection may show a different set of environments than the Environment Managers view.
🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 10043
Unable to select python kernel for my .ipynb jupyter notebook (in vs code 1.64.2) · Issue #10043 · microsoft/vscode-jupyter
April 30, 2022 - Issue Type: Bug I'm sometimes (seems random) unable to select my python kernel. The Select Kernel options shows an empty list and I don't see any of my anaconda environments there. I also tried setting the interpreter by providing the co...
Author   Nihal-M