Exception: Cannot find PyQt5 plugin directories when using Pyinstaller despite PyQt5 not even being used

I managed to fix the same problem I encountered (conda 4.5.4, pyinstaller 3.4) without uninstalling conda:

pip install PyQt5

conda already installed PyQt when I used conda install jupyter seaborn. Interestingly, using conda install PyQt5 does not fix my problem. I don't know why. In any case I hope this may help someone out there.


I think there is an issue with the current version of pyinstaller. I uninstalled the default version.

pip uninstall pyinstaller

and installed the latest trial version

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

and then it worked for me.

More information here: https://github.com/pyinstaller/pyinstaller/issues/3938


None of the answers on this post worked for me, but I found this thread from a few months ago and it worked. Linking it here in case others run into a similar problem and come across this thread before the other one.

The solution is to add --exclude-module PyQt5 after the pyinstaller statement.