Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
The pyside2 code cannot run on Apple Silicon, the process exists, but no window will pop up.!
Code Like This:
from PyQt5.QtWidgets import QApplication, QWidget
if name == 'main':
app = QApplication(sys.argv)
w = QWidget()
@JerryMazeyu Your link is broken.
Do you see any errors/warnings when starting from a terminal?
Also, you are talking about PySide, but in the code you posted you're using PyQt.
Both pyside and pyqt have the same result.
When I run this code on latest MAC, this icon pop up but I cannot see any QT window. And my code does not report errors.
I dont know why.
@JerryMazeyu Please start your app from a terminal and check there whether there are any errors/warnings.
no warning or bugs. But no window pops up.
@JerryMazeyu Is your python native ARM build or x86?
This Python virtual environment is migrated from x86 Macbook.
@JerryMazeyu But is the Python interpreter ARM or x86 build?
@jsulm This python environment is built on x86, translated by Rosetta2 and run on the ARM architecture Mac.
@JerryMazeyu You should check the Qt libs from PySide/PyQt you're using: whether those are also x86 (most probably they are).
@jsulm Sorry, I dont know how to check the QT libs. Could you teach me how？thx!
@JerryMazeyu On Linux
Should be same on MacOS.
That means QT libs is built on x86?
@JerryMazeyu Yes, so that is not the issue. You can try to run your script through the Python debugger.
Well, I fix this bug... The problem seems to be in anaconda. I migrate my anaconda from old x86 MacBook. When I try to change the interpreter to my real system environment /usr/loacl/bin/python3.7, it works. Thx a lot!@jsulm