Importing Python modules to Jupyter notebook

Viewed 97

I have got the next hierarchy:

project_name
|-utils
| |-lib
|   |-module.py
|-notebooks
| |-nb.ipynb

How can I import module.py to the np.ipynb?

1 Answers

Use sys package as follows on nb.ipynb

import sys
sys.path.insert(0,"/path/to/module.py")
Related