码迷,mamicode.com
首页 > 其他好文 > 详细

Reason: Incompatible library version: QtWidgets.abi3.so requires version 5.15.0 or later, but QtWidgets provides version 5.7.0

时间:2020-09-24 21:51:42      阅读:46      评论:0      收藏:0      [点我收藏+]

标签:table   解决方案   control   path   ica   push   enc   spl   info   

开发环境:mac+python3.8.3+pyqt5.15.1+vscode

使用py2app打包运行后报错。

在命令行看到如下报错:

Traceback (most recent call last):
File "/Users/panda/Documents/work/python/xxx/dist/Video.app/Contents/Resources/__boot__.py", line 110, in <module>
_run()
File "/Users/panda/Documents/work/python/xxx/dist/Video.app/Contents/Resources/__boot__.py", line 84, in _run
exec(compile(source, path, "exec"), globals(), globals())
File "/Users/panda/Documents/work/python/xxx/dist/Video.app/Contents/Resources/mainUI.py", line 6, in <module>
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QMessageBox, QDesktopWidget
ImportError: dlopen(/Users/panda/Documents/work/python/xxx/dist/Video.app/Contents/Resources/lib/python3.8/PyQt5/QtWidgets.abi3.so, 2): Library not loaded: @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets
Referenced from: /Users/panda/Documents/work/python/fetch_script_from_lanfan/dist/Video.app/Contents/Resources/lib/python3.8/PyQt5/QtWidgets.abi3.so
Reason: Incompatible library version: QtWidgets.abi3.so requires version 5.15.0 or later, but QtWidgets provides version 5.7.0

原因:

系统自带的qt版本库过低:

位置:

技术图片

 

 

解决方案:

去qt官网,下载对应版本的qt。

安装后在下图位置找到对应所需的库,完成替换:

技术图片

 

 再次打包测试,正常运行。

Reason: Incompatible library version: QtWidgets.abi3.so requires version 5.15.0 or later, but QtWidgets provides version 5.7.0

标签:table   解决方案   control   path   ica   push   enc   spl   info   

原文地址:https://www.cnblogs.com/pandablessing/p/13723244.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!