Mazzesy

Results 11 comments of Mazzesy

> Just doing the job by copying the llama-index, langchain and related python packages from installed site-packages folder to the exe folder of pyinstaller generated exe, so that when running...

adding the langchain folder in the spec file using the line below works: a.datas += Tree('path/to/folder', prefix='langchain')

I think changing to `datas += collect_data_files('langchain')` to `datas += Tree('path/to/folder', prefix='langchain')` should work

to run `PyInstaller` with the `spec-file` use `py -m PyInstaller name_of_spec-file`. Use the path to the actual folder, so `G:\DEV\.venv\langchain\Lib\site-packages\langchain`

My `spec-file` looks like this: ``` # -*- mode: python ; coding: utf-8 -*- block_cipher = None a = Analysis( ['mainpy'], pathex=[], binaries=[], datas=[], hiddenimports=[], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], win_no_prefer_redirects=False,...

the line `a.datas += Tree('path//to//langchain', prefix='langchain')` is missing in your spec file

Did you install `sentence-transformers` with with `pip install sentence-transformers` as mentioned in the traceback call?

when you run the exe-file, there should be a temporary folder in AppData/local (I think), where all the data from the program is stored. If the package `sentence-transformers` is not...

If adding that statement did not work, you could try adding a hook. Create a `hook-sentence-transformers.py` file with ``` from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('sentence-transformers') ``` Save it in...