Open davidrpugh opened 6 years ago
My current solution is to do the following in the notebooks...
import sys
sys.path.append("..")
from src.data import ???
...where ???
should be replaced by whatever scripts you are importing.
That's the solution we use as well. In next release we could add export PYTHONPATH="$PYTHONPATH:/mnt"
as environment variable in the image.
@rkoppula I think it might be better to explicitly document the need to import the scripts as above rather than append the PYTHONPATH
variable in the Dockerfile. But perhaps the median user would prefer a solution that makes imports just work as expected.
How do you import python modules defined in the
src
sub-directories when using Jupyter notebooks residing in thenotebook
directory?