I am trying to play around with a bunch of packages with Slicer, some of which are called through the command line/terminal. To make my life easier, I’m trying to connect the build-in python interpreter with Slicer to the IDE I use (PyCharm). I connected the the IDE to the PythonSlicer.exe file. However, when running anything I am getting this error.
ModuleNotFoundError: No module named 'PythonQt'
Is there something I am missing?
The reason I am not using the normal remote debugger is that the file I am working with is run through cmd/terminal.
Thanks for your reply!
I just want to execute python script on terminal, but I used the '…/Slicer-4.11.20210226-linux-amd64/bin/PythonSlicer xx.py ', which is wrong. When I use ‘…/Slicer-4.11.20210226-linux-amd64 --python-script xx.py’, I get the correct result.
dear Lasso, I got another problem: when I execute python script on terminal on ubuntu, which works. But when I use SSH to connect ubuntu on another PC(windows) , and execute the same python script on terminal with same code
qt.qpa.xcb: could not connect to display
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: xcb.
You need a frame buffer to run Slicer. If you search for topics in the forum about running Slicer on a headless machine then you will find more details (as far as I remember xdummy and xvfb-run may help).
emmm, to be honest, I did what you said above, maybe I’m a newbie, I don’t get the correct way to solve this problem.
Actually my problem is same as this
But I want to convert RTStruct file to .vtp file, so I got the same error