Donders-Institute / bidscoin

BIDScoin converts your source-level neuroimaging data to BIDS
https://bidscoin.readthedocs.io
GNU General Public License v3.0
131 stars 35 forks source link

Qt GUI toolkit not working on WSL 2 (kali-linux) #203

Closed giurdeluca closed 1 year ago

giurdeluca commented 1 year ago

General summary bidseditor is not working on my local pc (I have windows 11 and currently using kali-linux on wsl2)

Additional detail As I tried to test bidscoin with bidscoin -t i got

INFO | Testing the PyQt GUI setup:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Aborted

Failed attempts

pip install --force-reinstall bidscoin[dcm2niix2bids]@git+https://github.com/Donders-Institute/bidscoin@v4.1.1+qt5 but i still get

   INFO | Checking the bidsmap run-items:
SUCCESS | All run-items in the bidsmap are valid
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Aborted
marcelzwiers commented 1 year ago

This unfortunate problem is an operating system issue outside the scope of bidscoin. I've tested the installation on various systems, and posted the solutions in the troubleshooting guide. I'll try WSL later next week and see what I can do

marcelzwiers commented 1 year ago

I just downloaded a kali-linux virtualbox on my windows-10 machine, installed bidscoin and ran bidscoin -t without any problem / Qt-error. So bidscoin and Kali are not the problem. I will try WSL on my personal windows-11 laptop later

marcelzwiers commented 1 year ago

I installed WSL 2 on Win11 and got the same Qt errors using the default Ubuntu VM. I installed the dev tools:

sudo apt install qt6-base-dev

But that didn't resolve the issue (neither did other attempts). I read on the Microsoft WSL support page:

Note

Support for GUI apps on WSL does not provide a full desktop experience. It relies on Windows desktop, so installing desktop-focused tools or apps may not be supported. To request additional support, you can file an issue in the WSLg repo on GitHub.

In conclusion I think that WSL graphical support is just crap and that you are better of installing bidscoin directly in Windows or run a proper linux VM in Virtualbox or similar. Sorry, this is on Microsoft

marcelzwiers commented 1 year ago

Ok, I tried the Qt5 branch and that did work:

sudo apt install python3-pyqt5 python3-pyqt5.qtx11extras
pip install bidscoin@git+https://github.com/Donders-Institute/bidscoin@v4.1.1+qt5

Did you try that on Kali?

marcelzwiers commented 1 year ago

And did you upgrade to the latest Kali?

sudo apt-get update
sudo apt-get dist-upgrade
giurdeluca commented 1 year ago

I've tried updating kali and re-installing the Qt5 branch with the commands you suggested

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt install python3-pyqt5 python3-pyqt5.qtx11extras
pip install bidscoin@git+https://github.com/Donders-Institute/bidscoin@v4.1.1+qt5

and it worked now. Thank you for your kind help

marcelzwiers commented 1 year ago

No problem, glad it worked out for you :-)