Update pyproject.toml adding pyqt5 binding#199
Update pyproject.toml adding pyqt5 binding#199timonmerk wants to merge 1 commit intomne-tools:mainfrom
Conversation
|
I don't think we want to do this. In principle mne-qt-browser can use PyQt5, PyQt5, PySide2, or PySide6, hence why we don't force users to install any specific one. |
|
The error message raised when importing the browser should explicitly tell the user that he needs to choose and install one of the bindings, PyQt5, PyQt6, PySide2, or Pyside6. Is that not the case? |
|
... and if it's not, I consider it a |
|
I don't think the message mentions specific bindings. I've wanted to add this at some point in spyder-ide/qtpy#221, but it seems like it wasn't important enough to pursue it further. |
I agree we should produce a helpful error message Or simply explicitly depend on one of those bindings, as done in this PR It's not cool you end up with a defunct package after pip installing. |
|
How about a post-install script which checks for the presence of at least one binding, and else install a default one? That has to be doable with |
|
TBH, I would try to improve the error message in QtPy. Installing something with a post-install script could lead to problems (I'm not an expert, but many package dependency analysis tools will probably not be able to parse such custom post-install things). Another alternative would be to ditch QtPy and use a specific binding as @hoechenberger suggested. It looks like PyQt6 would be the best option, but I'm sure this will trigger other issues (most likely related to PyVista). |
|
A third option could be that our backend issues an appropriate error message (i.e. we catch the generic one from QtPy and turn it into something more useful). |
|
Agreed QtPy would be the right place but who knows if they'll accept a fix based on spyder-ide/qtpy#221 going stale. I'll close this PR and @timonmerk if you're up for it feel free to open another PR to improve our first |
When installing mne-qt-browser under Windows 11, mne version 1.5.1,
pip install mne-qt-browserdoes not install the required qt binding.raw.plot()therefore results in the error:Installing pyqt5 with
pip installl pyqt5fixes the issue as described here. Therefore I added the dependency to thepyproject.toml