반응형
# Problem
When using a Jupyter notebook file in Visual Studio code with the Jupyter extension I receive the error:
The kernel failed to start due to the missing module 'IPython'. Consider installing this module. Click here for more info.
# Solution
First uninstall all jupyter related modules: (from: https://stackoverflow.com/a/52912244/1516331)
python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console jupyterlab_pygments notebook qtconsole nbconvert nbformat jupyterlab-widgets nbclient ipykernel ipynb
And then reinstall ipykernel. I'm using VScode so when I run a cell, VSCode asked me to installipykernel. The following should work the same alternatively:
conda install -c conda-forge --update-deps --force-reinstall ipykernel -y
pip install jupyter
# Reference
[StackOverFlow] kernel failed to start using conda environment with Jupyter in Visual Studio Code: https://stackoverflow.com/questions/71003266/kernel-failed-to-start-using-conda-environment-with-jupyter-in-visual-studio-cod
반응형