I am trying to create a local package to handle API calls, but I am having some problems with creating an exe with PyInstaller. Folder structure: CompanyAPI ├──CompanyAPI │ ├──__init__.py │ ├──site1.py │ ├──site2.py ├──venv │ ├── ... ├──setup.py This works fine in PyCharm, where I can import with from CompanyAPI import site1 after adding the root folder as a source in the project structure. However, when I try to package with PyInstaller using --hidden-imports, I get the error: Traceback (most recent call last): File "main.py", line 3, in <module> ModuleNotFoundError: No module named 'CompanyAPI' I have added the root folder with sys.path.extend. I have installed on my system (not a venv) with: pip install -e ./ --find-links file:/CompanyAPI [...] Successfully built CompanyAPI Installing collected packages: CompanyAPI Successfully installed CompanyAPI-0.1.0 which are the two solutions I have found online. Issue persists. Ideally I'd like the package added to the list in PyCharm for ease of use, but being able to make an exe is more important. What am I missing here? Continue reading...