Pyinstaller hidden import not found for unused library
Gensim uses tensorflow.
You can add --hidden-import="tensorflow._api.v2.compat.v1.estimator" with your pyinstaller command and it will resolve this error.
I tried to use pyinstaller to compile a .py I wrote. I used a bunch of libraries including sklearn, nltk, gensim but did not use tensorflow at all. However, when I compiled the program, there were many warnings about tensorflow modules not found, such as:
WARNING: Hidden import "tensorflow._api.v2.compat.v1.estimator" not found!
Is it because other libraries somehow used tensorflow in their functions? Is there a way to find what the usage is? Thanks!