所以,我正在尝试运行一个基本代码:
from PyQt5.QtWidgets import QMainWindow, QPushButton, QApplication
import sys
class Example(QMainWindow):
def __init__(self):
super().__init__()
btn = QPushButton("Hello World!", self)
btn.move(50,75)
self.setGeometry(100, 100, 200,150)
self.setWindowTitle('PyQt Window')
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
而且这个错误不断弹出:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyQt5/QtWidgets.abi3.so, 2): Symbol not found: _futimens
Referenced from: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
我正在使用 Python 3.8,并使用“pip3 install pyqt5”安装了 PyQT5。我尝试使用自制软件,但它不起作用,因为我有一个超级旧版本的 macOS。到目前为止,我充其量只使用 SQLite Studio,没有任何问题。(所以,是的,这里是超级初学者)。有什么解决办法吗?