pyinstaller终极打包命令:
pyinstaller main.py -Fw --paths="C:\Users\Administrator\.virtualenvs\first-gui\lib\site-packages\cv2" --copy-metadata pyqt5_plugins --copy-metadata qt5_tools --copy-metadata qt5_applications --hidden-import qt5_tools --collect-submodules qt5_applications --collect-submodules pyqt5_plugins
一句话:你可以永远相信stackoverflow,而是国内抄来抄去的帖子【9个小时的领悟,我为自己哭会】
path: opencv-python,为以下的错误提示
ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
--clollect-submodules: 为以下错误
pkg_resources.DistributionNotFound: The 'pyqt5_plugins' distribution was not found and is required by the application
假如还有问题:记得更新pip,卸载pyinstaller,再重新安装pyinstaller
网友评论