Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter extension on VSCode brings wrong interpreter

enter image description here Kernel is selected as "AI", but brings normal Python37 interpreter

In the first two lines, I printed the current executable path, but it didn't load the correct path C:\pyvenv\ai\Scripts\python.exe.

like image 697
A-H4NU Avatar asked Sep 06 '25 00:09

A-H4NU


1 Answers

I find this method to be easier to manage and understand than the ipykernel install method because you can just delete your virtual environment when you're done.


  1. Install Jupyter in your desired environment, in your case:
C:\pyvenv\ai\Scripts\python.exe -m pip install jupyterlab
  1. In VSCode, open your command palette using CTRL+SHIFT+P (+SHIFT+P on Mac) and select the "Jupyter: Select interpreter to start Jupyter server" command

  2. Select the Python interpreter you just used to install jupyter from the list of kernels (I had to restart VSCode to get the environment to show up in that list).

like image 190
hkennyv Avatar answered Sep 08 '25 14:09

hkennyv