Python: 使用pyinstaller打包exe时报错Cannot find PyQt5 plugin directories

Python: 使用pyinstaller打包exe时报错Cannot find PyQt5 plugin directories

环境win7,python3.6,pyinstaller3.3,在用pyinstaller打包的时候会报错。

图片说明

将自己的python程序打包成.exe/.app(秀同学一脸呐) https://blog.csdn.net/MrLevo520/article/details/51840217
Python程序打包成exe可执行文件 https://blog.csdn.net/zengxiantao1994/article/details/76578421
注意将要打包的py文件拷贝到新建的文件夹内
在打包时会出现问题Cannot find existing PyQt5 plugin directories ,具体截图如下
解决方法就是用everything搜索PyQt5,找到 /Library/plugins路径下的PyQt5文件夹,将里面的dll动态库pyqt5qmlplugin.dll复制出来
按照错误提示的路径,一个个的新建文件夹,形成目录C:\qt5b\qt_1524647842210_h_env\Library\plugins,将刚才复制出来的dll动态库拷贝进去即可