Our application started as a simple FastAPI application, while working on it we used relative paths for the imports. Now we need to create another application that extends the existing one. So our new code structure looks like this (there are many more files, this is just to show the issue): project/ setup.py __init__.py core/ # The original application __init__.py src/ __init__.py api/ __init__.py api.py routes/ __init__.py router1.py core_plus/ # The extending application __init__.py src/ api/ main.py api.py I do manage to install core to core-plus using pip install -e .. from project directory. However, when importing something from core (for example core.src.api.api) it fails to run the internal imports (import routes.router1) # project/core_plus/src/api/api.py from core.src.api.api import routers .... # project/core/src/api/api.py import routes.router1 as router1 routers = [rotuer1] .... I am looking for a way to make it work that wont involve editing all imports in core, and that won't be "hackish" on the other hand (for example adjusting sys.path which may cause ambiguity if having files/dirs with the same names on both core/cloud) Any suggestions? Continue reading...