I've run into an import issue in my library, when trying to replicate the notebooks behavior in SHAP. In this case, a Juypter Notebook in the notebooks directory includes import shap
, where the shap package includes all of the functionality.
My library has a similar structure, where I have import package
. This package has an __init__.py
file, but the following error occurs
ModuleNotFoundError: No module named 'package'
The fix is likely trivial, but I have not been able to work it out.
File structure:
dir
|
+--notebooks
| |
| +--foo.ipynb
|
+--package
|
+--__init__.py
|
+--subpackage1
|
+--subpackage2
Both subpackage1 and subpackage2 have an __init__.py
file.