-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
volpy gui doesn't work with Qt6 (or Qt5, except on some platforms) #1454
Comments
Hm. Merely installing pyqt into the environment also doesn't seem to produce a working app.
|
Ah, that warning or error can be solved by unsetting the SESSION_MANAGER env var. Still core dumping on me; unclear why. |
So unsetting SESSION_MANAGER solves the session management error, but the QWidget error that causes the core dump comes from the first call to pyqtgraph; this may be caused by both qt5 and qt6 installed in my current test environment. Looking into whether a pure qt5 environment crashes. |
Apparently only the pyqt5 bindings are installed, so it's not that; it's something else. We also can't port this until there's good packaging for pyqt6 in conda-forge. So we have to put this issue on hold. |
I just spent a fair bit more time looking into why our app now crashes on startup (even though we're not trying to use Qt6), and I have an answer I'm reasonably sure of. On conda-forge, the pyqt package is stuck on PyQt5. It's unclear why this is the case, but people have made workarounds for this and related PyQt versioning issues using a package called PySide6. PySide6 seems to be a different implementation of PyQt6 (or perhaps a generic PyQt-any-version binding?). matplotlib, which we import, switched to using PySide6 late last year: conda-forge/matplotlib-feedstock#393
What this means though is that any application that uses pyqt (aka PyQt5) and pyqtgraph in an environment where matplotlib is present is going to be broken, because if the application creates a QApplication with PyQt5, pyqtgraph will not be able to recognise it because it's not a Qt6 version of QApplication, so it will throw up its hands and crash (probably better than continuing on and crashing in a more subtle way; there's already no way to win at that point).
If there's a good way to solve this, I don't know what it is; in theory pyqtgraph could be more careful with that set of imports to try to figure out if the app has already committed to Qt5 or Qt6, but that may be fragile. |
For now, I think I see a few routes forward: C feels the most future-friendly, but I'm not sure if there will be any hiccups from that. |
It turns out that porting the volpy gui to use pyside6 is trivial; took me less than 5 minutes. |
Apparently has issues on OSX; see #1451. Hopefully will not take too much work to resolve. |
thank you~ @pgunn |
The volpy gui doesn't seem to work with qt6, which is delivered by default with most environment solves; it has a dependency on PyQt5.
It's unclear how hard it would be to update
caiman/source_extraction/volpy/volpy_gui.py
to accept qt6.@caichangjia giving you a heads-up on this; I'll look into it too but you're much more familiar with that code.
The text was updated successfully, but these errors were encountered: