2

This is somewhat of a similar question that I've previously had. Trying to figure out a way to publish an executable without the client needing nltk_data libraries. Current directory tree looks like this:

.
+-- Include
+-- Lib
+-- Scripts
+-- Src
|    +-- mainservice.py  << flask service
|    +-- mainprogram.py  << nltk_data logic

The issue is that I can't seem to add nltk_data as a hidden import. The executable builds fine but when the client runs my executable it states that it needs nltk_data to run.

My current pyinstaller command is:

'pyinstaller --hidden-import=flask --onefile -d -y ' + pwd + '/src/semantic_service.py'

I've tried several variations to try to include nltk_data as a hidden import and nltk and haven't had much luck either.
So far I've referred to this link https://github.com/pyinstaller/pyinstaller/issues/1099 to try to find resolves with not much luck.

Is it possible to create nltk_data as a hidden import, or would the client just always need a copy of this library? If there is a hook solution, could someone help point me to try right direction?

vvvvv
  • 25,404
  • 19
  • 49
  • 81
jc43
  • 71
  • 8

0 Answers0