pyinstaller hidden-imports for spacy deployment (windows) #6210
-
Hey, I'm having a difficult time finding information for making pyinstaller deploy spacy dependencies for windows. When I run I've tried to make a hidden-imports .py file. (code attached) but when I run pyinstaller main.py --additional-hooks-dir=. myhooks.py I'm not sure what I'm doing wrong or if I'm on the right path to get this working or not. I'm not looking for anyone to do the work for me but some direction would be appreciated. Thanks in advance. HOOK FILE FOR SPACYfrom PyInstaller.utils.hooks import collect_all ----------------------------- SPACY -----------------------------data = collect_all('spacy') datas = data[0] ----------------------------- THINC -----------------------------data = collect_all('thinc') datas += data[0] ----------------------------- CYMEM -----------------------------data = collect_all('cymem') datas += data[0] ----------------------------- PRESHED -----------------------------data = collect_all('preshed') datas += data[0] ----------------------------- BLIS -----------------------------data = collect_all('blis') datas += data[0] ----------------------------- OTHER ----------------------------hiddenimports += ['srsly.msgpack.util'] from PyInstaller.utils.hooks import collect_data_files |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Can you try building without
If you want to create custom hooks, the naming convention is
You have a space between That said, recent versions of What version of |
Beta Was this translation helpful? Give feedback.
Can you try building without
--noconsole
, so you can see if there are any error messages in the console?If you want to create custom hooks, the naming convention is
hook-<modulename>.py
, and you need to pass the directory containing the extra hook files to--additional-hooks-dir
.