That's the error:
Traceback (most recent call last):
File "/Users/Chayma/pythonProject/venv/main.py", line 3, in <module>
from PyQt5 import QtWidgets
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so: mach-o, but wro`enter code here`ng architecture
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so: mach-o, but wrong architecture
And that is my code:
import sys
from PyQt5.uic import loadUi
from PyQt5 import QtWidgets
import PyQt5.QtWidgets as QtWidgets
from PyQt5.QtWidgets import QDialog, QApplication, QWidget
class MainWindow(QDialog):
def __init__(self):
super(MainWindow, self).__init__()
loadUi("helloooo.ui", self)
#main
app = QApplication(sys.argv)
mainwindow = MainWindow()
widget = QtWidgets.QStackedWidget()
widget.addWidget(mainwindow)
widget.setFixedHeight(800)
widget.setFixedWidth(1200)
widget.show()
try:
sys.exit(app.exec_())
except:
print("exit")