MouseLand / suite2p

cell detection in calcium imaging recordings
http://www.suite2p.org
GNU General Public License v3.0
344 stars 240 forks source link

BUG: pyqt fails to load on fresh installation when no conda pyqt isn't installed #1005

Closed oraby closed 9 months ago

oraby commented 1 year ago

Describe the issue:

After creating a conda environment, I attempted to install suite2p on a new windows system using both: python -m pip install suite2p and pip install -e . after cloning this repo (commit tag: v0.13.1)

On trying to run either >seuite2p or python -m suite2p, I get this message:

Cannot move to target thread (0x2b1c97b0cf0)

qt.qpa.plugin: Could not load the Qt platform plugin "windows" 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: direct2d, minimal, offscreen, webgl, windows.

Then it returns to prompt.

After checking few stack overflow posts, and trying few things around, the fix was installing pyqt5 through conda: conda install pyqt

My guess the source of the problem is that pip install pyqt when triggered through setup.py, doesn't install (or maybe just doesn't set correctly the environment variables) the extra required pyqt libraries, while conda install takes care of it.

Reproduce the code example:

python -m pip install suite2p
# or just: >suite2p

Error message:

Cannot move to target thread (0x2b1c97b0cf0)

qt.qpa.plugin: Could not load the Qt platform plugin "windows" 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: direct2d, minimal, offscreen, webgl, windows.

Version information:

0.13.2.dev0+g9808eca.d20230726

Context for the issue:

No response

milesOIST commented 1 year ago

https://github.com/MouseLand/suite2p/issues/1010#issuecomment-1666857297

chriski777 commented 9 months ago

This should be addressed by #1057. Please try again after installing the latest version. Feel free to reopen the issue if the problem persists.