Same problem as in this question sys.path different in Jupyter and Python - how to import own modules in Jupyter?. In pure Python, it prepends my system environment variable
--Just chiming in here since the accepted answer didn't give the complete solution--
You can add the path to your modules to the JUPYTER_PATH
environment variable, just the same as you would for modifying the PYTHONPATH
environment variable:
export JUPYTER_PATH="${JUPYTER_PATH}:/path/to/add/here/"
If you're on a Mac or other Unix system, you would just drop the above line into your ~/.bash_profile
Hint: make sure you run source ~/.bash_profile
to enact the changes and close and restart your jupyter notebook.