admin管理员组

文章数量:1406152

I am trying to run Jupyter notebook in VSCode, but I cannot load the virtual environment kernel. In fact, I don't see any kernels. When I try to select a Python Environment kernel, doesn't show any kernel and instead offers me the Install Python. Clicking on it does not do anything. Reloading VSCode does not do anything. Python scrips works just fine in the virtual environment, but Jupyter notebooks cannot find any kernels.

I tried:

  1. pip3 install ipykernel --force-reinstall
  2. python3 -m ipykernel install --user --name=.venv

I tried clicking on "Install Python" in the select kernel dialog, but that does not do anything at all.

How can I get the Jupyter notebook to work with the .venv kernel?

Venv is already installed.

source .venv/bin/activate
pip3 install ipykernel --force-reinstall   
python3 -m ipykernel install --user --name=.venv

I expected that .venv would show up in the list of available Jupyter kernels.

本文标签: visual studio codeJupyter notebook in VSCode does not see venv kernelStack Overflow