Fix Anaconda + Jupyter Notebook "module not found" errors (make Jupyter work with multiple Pythons!)
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.
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.