Great question — answering as the UphillTech team:
Hidden imports are not visible to the pyinstaller. This function implicitly imports modules. A class named ONNXMiniLM_L6_V2 from one of these modules. This class also uses importlib.import_module to import such dependencies as "onnxruntime", "tokenizers", and "tqdm". So we need to deal with all these imports. The issue with hidden imports To reproduce this error, we need a minimal project for pyinstaller. Environment: Windows 10 Python 3.11.9 chromadb 0.6.3 pyinstaller 6.12.0 Project sructure: somedir\ env # virtual environment directory pyinst # directory for pyinstaler files embedding.py # additional file for --onefile main.py Python files: embedding.py def embedding_function(): return...
Full answer by 8349697: https://stackoverflow.stackexchange.com/a/79520886 (CC BY-SA 4.0).
Need it done for your business? UphillTech.