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
.

- 71
- 4
3 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.
- Install Jupyter in your desired environment, in your case:
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"
commandSelect 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).

- 2,526
- 1
- 17
- 26
you have the pip installation of tensor flow in your python environment?

- 36
- 2
-
sure, yes. I installed tensorflow in the environment, but jupyter does not load the virtual environment. – A-H4NU May 01 '21 at 03:33
-
ok, look this page, i think that you should conect the kernel of jupyter with your environment as follows https://albertauyeung.github.io/2020/08/17/pyenv-jupyter.html – Fabian Andres May 01 '21 at 03:48
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/

- 1,155
- 2
- 19
- 36