Skip to content
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

INSTALLATION: <Please write a comprehensive title.> #613

Closed
MarcoUniPr opened this issue Mar 11, 2024 · 4 comments
Closed

INSTALLATION: <Please write a comprehensive title.> #613

MarcoUniPr opened this issue Mar 11, 2024 · 4 comments

Comments

@MarcoUniPr
Copy link

Describe the issue:

Hi,
I am currently able to work with Kilosort 3 without any issues. However, I am encountering difficulties while attempting to install Kilosort 4. I receive the following error message:

I have attempted to resolve this issue by reinstalling the application, but unfortunately, this did not solve the problem.

Do you have any advice or suggestions on how to proceed?

Thank you for your assistance.

Best regards,
Marco

Provide environment info:

(kilosort) C:\Users\lanzi>python -m kilosort
QObject::moveToThread: Current thread (0x2a7734988a0) is not the object's thread (0x2a77349d4e0).
Cannot move to target thread (0x2a7734988a0)

qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "C:\Users\lanzi\anaconda3\envs\kilosort\Lib\site-packages\PyQt5" 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: minimal, offscreen, webgl, windows.

Operating system information:

Windows 10

@jacobpennington
Copy link
Collaborator

jacobpennington commented Mar 11, 2024

Hello,

This is an issue with pycharm and pyqt5 not being compatible without tweaking some settings, not a Kilosort issue. There are some suggested fixes in #597, or you can just launch kilosort from a standalone terminal instead of pycharm.

If you're encountering this under some other condition please let us know.

@Rodgers-PAC-Lab
Copy link

I'm also getting a related issue. I'm not using PyCharm, just trying to start from the terminal in Linux.

This is after installing from pip:

(kilosort) mouse@octopus:~$ python -m kilosort
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 (core dumped)

This is after installing the development version from the github:

(kilosort) mouse@octopus:~/dev/Kilosort$ python -m kilosort
Traceback (most recent call last):
  File "/home/mouse/miniconda3/envs/kilosort/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/mouse/miniconda3/envs/kilosort/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/mouse/dev/Kilosort/kilosort/__main__.py", line 2, in <module>
    from kilosort.gui.launch import launcher
  File "/home/mouse/dev/Kilosort/kilosort/gui/__init__.py", line 4, in <module>
    from .data_view_box import DataViewBox
  File "/home/mouse/dev/Kilosort/kilosort/gui/data_view_box.py", line 2, in <module>
    import pyqtgraph as pg
  File "/home/mouse/miniconda3/envs/kilosort/lib/python3.9/site-packages/pyqtgraph/__init__.py", line 18, in <module>
    from .colors import palette
  File "/home/mouse/miniconda3/envs/kilosort/lib/python3.9/site-packages/pyqtgraph/colors/palette.py", line 1, in <module>
    from ..Qt import QtGui
  File "/home/mouse/miniconda3/envs/kilosort/lib/python3.9/site-packages/pyqtgraph/Qt/__init__.py", line 54, in <module>
    raise Exception("PyQtGraph requires one of PyQt5, PyQt6, PySide2 or PySide6; none of these packages could be imported.")
Exception: PyQtGraph requires one of PyQt5, PyQt6, PySide2 or PySide6; none of these packages could be imported.

@Rodgers-PAC-Lab
Copy link

ok fixed this with some combination of

pip uninstall pyqt5
conda uninstall pyqt
conda install pyqt

Somehow, pyqtgraph was not properly finding my PyQt5. Not sure why
Possibly the mix of things installed with conda and pip?

@jacobpennington
Copy link
Collaborator

Okay, good to know it's not just from pycharm. Unfortunately after doing more searching, it doesn't look like there's any single fix for it. For some people it's an issue with pycharm specifically, for others it's missing libraries that pyqt depends on, for other people export QT_QPA_PLATFORM=offscreen seems to fix the issue, or uninstalling/reinstalling like you did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants