Jupyter
Useful Commands
Common Issues & Troubleshooting
ModuleNotFoundError
Jupyter Notebook tends to create path issues that disagree with the python path run locally. To fix this, I use the following troubleshooting methods:
Kernel.json
In the terminal:
If there is disagreement between the paths (as shown above), you can redirect the Jupyter kernel to point at the desired directory.
Navigate to the /kernels
directory and locate kernel.json
Inside:
Where it lists "python3" change it to your python path where the libraries are being installed. For example:
The python3 kernel should now be pointing at the correct directory.
iPython Kernel Install
Navigate to the repository where the notebook files live and follow the recommendation in this issue from the Jupyter Github.
ipython kernel install
Check kernel.json
to confirm that the path has been updated and that the path matches.
To confirm that your Jupyter notebook is running the same version of python:
In Jupyter notebook:
In the terminal:
Oops! If they don't match, then use the executable path from your locally installed python version to update kernel.json
Restart the notebook to see results.
Uninstall Jupyter
If none of the above methods worked, try uninstalling Jupyter.
Last updated