1

I want to work on my Jupyter Notebook side the VS Code for the first time. When I load the file and run the first cell, I saw this message: enter image description here

Considering I have Anaconda on my system and this file works there without any problem, I tried to switch the Jupyter kernel via clicking on the top right corner option:

enter image description here

It shows me a popup in the left corner:

enter image description here

Consider that I already switched the interpreter into my active conda env, here the name is: ERML:

enter image description here

after confirming the installation, the terminal output is like this:

(ERML) C:\uni_siegen\ERML>C:/Users/HPTav/anaconda3/python.exe c:\Users\HPTav\.vscode\extensions\ms-python.python-2021.5.842923320\pythonFiles\pyvsc-run-isolated.py c:\Users\HPTav\.vscode\extensions\ms-python.python-2021.5.842923320\pythonFiles\shell_exec.py C:/Users/HPTav/anaconda3/Scripts/conda.exe install --name base ipykernel -y C:/Users/HPTav/AppData/Local/Temp/tmp-189602TyUrjDemNEd.log
Executing command in shell >> C:/Users/HPTav/anaconda3/Scripts/conda.exe install --name base ipykernel -y
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
(ERML) C:\uni_siegen\ERML>

But still, the kernel is the same and it doesn't change, also the code cannot be run at all.

H.PTavakoli
  • 351
  • 1
  • 4
  • 12

1 Answers1

2

It's not the problem about the VSCode while the pyzmq package installed in the conda(base) environment, and you can find the jupyter notebook work well in the virtual environment of conda.

When you run the jupyter notebook directly in the terminal under the conda(base) environment, you will find the problem of it: enter image description here

And after you uninstall and install the pyzmq package, the jupyter notebook under conda(base) environment work well: enter image description here

Steven-MSFT
  • 7,438
  • 1
  • 5
  • 13