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.
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.
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.
C:\pyvenv\ai\Scripts\python.exe -m pip install jupyterlab
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
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).
I've run into the same problem before too, what you need to do is create a virtual environment and add that venv to Jupyter Notebook. Once you do this you will be able to run your notebook in that venv.
Here's a good article that can help you figure this out: https://janakiev.com/blog/jupyter-virtual-envs/