TopLevelDir
├── CommonUtils
│ ├── setup.py
│ └── Sql
│ ├── class1.py
│ └── class2.py
├── Project1
│ ├── requirements.txt
│ ├── venv
│ ├── main.py
│ └── FolderA
│ ├── A_usesSqlClass1.py
│ └── A_usesSqlClass2.py
└── Project2
├── requirements.txt
├── venv
├── main.py
└── FolderB
├── B_usesSqlClass1.py
└── B_usesSqlClass2.py
I have the above folder structure for my projects. I want the CommonUtils folder/module/package to be visible in all .py files in all projects. Is there a way to do this without using absolute paths or altering PYTHONPATH (which I'm reluctant to do because I'm going to convert it to an .exe with PyInstaller and share it)? I'm not ready to publish it to PyPI yet, either.
All variations of import CommonUtils or from CommonUtils import * in files A* and B* (e.g. ..\CommonUtils etc.) fail with a ModuleNotFoundError: No module named 'CommonUtils' error.