Reputation: 555
This is a bug I cannot wrap my head around. I should first mention that everything works perfectly on PyCharm notebook Professional Edition (but I prefer VSCode's way of using notebooks).
When I click on Select Kernel
, 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:
Here, it's easy for me to find the path/to/python.exe
of my virtual environment (Python 3.12.5) by clicking on Enter interpreter path
:
However, when I click and locate path/to/python.exe
, nothing happens.
There is still the Select Kernel
button saying that I have not selected any Python environment for my notebook.
Things I did:
ipykernel
to my virtual environment but it was already installed.Python
extension enabled on VSCode.jupyter
extension enabled on VSCode.Select Kernel
. They did.python3 -m ipykernel install --user --name=projectname
.Upvotes: 0
Views: 92
Reputation: 74
Python: Select Interpreter
python.exe
(e.g., path\to\venv\Scripts\python.exe
).settings.json
{
"jupyter.kernels.trusted": [
"projectname" // Name used in `--name` during registration
]
}
python -m venv new_venv
Upvotes: -1
Reputation: 4259
>Jupyter: create interactive Window
so that kernel will connect to the Python environment automatically. And now you can select the kernel in your ipynb.Or
Upvotes: 0