Fix Anaconda + Jupyter Notebook "module not found" errors (make Jupyter work with multiple Pythons!)




[ad_1]

Did you install Anaconda but Jupyter Notebook can’t find Anaconda? Or you run Jupyter but nothing seems to be installed? It’s a kernel problem! Let’s walk through how to solve “module not found” errors when Jupyter can’t find the Python you want to use.

Commands:
conda activate base
python -m ipykernel install –user –name anaconda-base –display-name “Anaconda (base)”

Alternatively, if you want to install another kernel from pyenv (or any other kind of python) you’ll run two commands, one to install the connect-to-Jupyter-through-a-kernel package and one to actually install the Python kernel:
~/.pyenv/versions/3.8.2/bin/python -m pip install ipykernel
~/.pyenv/versions/3.8.2/bin/python -m ipykernel install –user –name pyenv-382 –display-name “3.8.2 (pyenv)”

Not sure where all of your pythons are? Use “which -a python” to list all pythons in your PATH. Not all of these commands work on Windows, but the ipykernel ones will.

References:
https://ipython.readthedocs.io/en/stable/install/kernel_install.html

Source


[ad_2]

Comment List

  • Jonathan Soma
    January 12, 2021

    worked like a charm. Thanks !

  • Jonathan Soma
    January 12, 2021

    hey thanks a lot. your tutorial is so helpful!! I am surprised you have few comments.

  • Jonathan Soma
    January 12, 2021

    Thanks for tutorial! It works pretty well.

  • Jonathan Soma
    January 12, 2021

    Thanks a lot for the nice tutorial.

  • Jonathan Soma
    January 12, 2021

    So grateful to you, Thanks A Lot!

Write a comment