Skip to content

Instantly share code, notes, and snippets.

@gthb
gthb / __pyinstaller_spacy_load_language_model.md
Last active September 26, 2023 03:12
Spacy under pyinstaller failing to load a language model package

Minimal example to reproduce spacy failing to load language model package under pyinstaller

Run bash build-linux.sh to reproduce on Linux (assumes python3 is installed somewhere in $PATH), or build-win.bat to reproduce on Windows (assumes Python 3.7.6 is installed at C:/Python37/)

It will fail with something like:

$ ./dist/linux/Foo/foo_r
Traceback (most recent call last):
 File "run.py", line 2, in