How to build a python project into a single executable if it has files split in multiple directories?
This is my project structure:
├── main.py
├── main.spec
├── src/
│ ├── GUI/
│ │ ├── RecipyApp.py
│ │ ├── __init__.py
│ ├── __init__.py
│ ├── constants.py
│ ├── exceptions/
│ │ ├── ConfigError.py
│ │ ├── KeywordsNotFound.py
│ │ ├── __init__.py
│ ├── recipies/
│ │ ├── __init__.py
│ │ ├── recipy.py
│ ├── system/
│ │ ├── BaseIndex.py
│ │ ├── InvertedIndex.py
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── storage.py
├── tree.py
And when launching it in terminal it works perfectly. However, when building it with pyinstaller like that:
pyinstaller --onefile --windowed main.py
And launching gives an error:
Traceback (most recent call last):
File "main.py", line 2, in <module>
ModuleNotFoundError: No module named 'src.GUI.RecipyApp'