ben-pr-p
ben-pr-p
Mmarimo
Created by ben-pr-p on 9/6/2024 in #help-support
Relative Imports
I'm having trouble figuring out how to do relative imports (I'm not too familiar with Python modules). My folder structure is: /notebooks -- /public ---- my-notebook.py -- /private -- util.py /src -- app.py In my-notebook.py, which I'm running from the project root via marimo edit notebooks/public/my-notebook.py, I have:
from .notebooks.util import warehouse
from .notebooks.util import warehouse
But I get: ImportError: attempted relative import with no known parent package I imagine this is an obvious fix for someone with experience here! Just looking to set up re-use of shared setup functions across notebooks
7 replies