I encounter an issue when I use the Jupyter Notebook in VS code. The screen shows "Python 3.7.8 requires ipykernel to be installed
". I followed the pop-up to install ipykernel. It still does not work. The screenshot is attached. It bothers me a lot. Could anyone help me with it? Tons of thanks.
The IPython kernel is the Python execution backend for Jupyter. The Jupyter Notebook and other frontends automatically ensure that the IPython kernel is available. However, if you want to use a kernel with a different version of Python, or in a virtualenv or conda environment, you'll need to install that manually.
This package provides the IPython kernel for Jupyter.
To check the Python version in your Jupyter notebook, first import the python_version function with “ from platform import python_version “. Then call the function python_version() that returns a string with the version number running in your Jupyter notebook such as "3.7. 11" .
python2 -m pip install ipykernel python2 -m ipykernel install --user Or using conda, create a Python 2 environment: conda create -n ipykernel_py2 python=2 ipykernel source activate ipykernel_py2 # On Windows, remove the word 'source' python -m ipykernel install --user
Make sure you have ipykernel installed in your environment. If you are using pip to install ipykernel in a conda env, make sure pip is installed: For example, using conda environments, install a Python (myenv) Kernel in a first environment:
If you are using pip to install ipykernel in a conda env, make sure pip is installed: source activate myenv conda install pip conda install ipykernel # or pip install ipykernel. For example, using conda environments, install a Python (myenv) Kernel in a first environment:
For example, using conda environments, install a Python (myenv) Kernel in a first environment: source activate myenv python -m ipykernel install --user --name myenv --display-name "Python (myenv)" And in a second environment, after making sure ipykernel is installed in it:
I had the same issue and spent the whole day trying to resolve it. What worked for me was installing the Jupyter dependencies for anaconda:
> conda install jupyter
I installed this in my base environment. After this VSCode worked without any errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With