I have written a GUI in PyQt5 which includes the line
from sklearn.ensemble import RandomForestClassifier
.
Following the suggestion in this answer, in \Anaconda3\Lib\site-packages\PyInstaller\hooks
, I have added a file called hook-pandas.py
which contains the following:
hiddenimports = ['pandas._libs.tslibs.timedeltas',
'sklearn.neighbors.typedefs']
After that, I tried running
pyinstaller -F visual_vitals.py --hidden-import sklearn.neighbors.typedefs
in the Anaconda Prompt.
However, I get the error
RecursionError: maximum recursion depth exceeded
.
If, on the other hand, I just run `pyinstaller visual_vitals.py'
then the .exe builds correctly, when I try running it, I get the message
modulenotfounderror: no module named 'sklearn.neighbors.quad_tree'
.
What can I do about that?
Note that the problem disappears if, instead of a random forest, I use a support vector classifier, so the problem is specific to this classifier rather than to the whole of sklearn
.