Kilosort icon indicating copy to clipboard operation
Kilosort copied to clipboard

INSTALLATION: ubuntu 18.04 installation fails when installing pyqt6

Open pderdeyn opened this issue 2 months ago • 1 comments

Describe the issue:

I am installing kilosort4 on a Ubuntu 18.04 computer. I am running the following installation commands from the documentation

conda create --name ks4_ece_pieter python=3.11
conda activate ks4_ece_pieter
python -m pip install kilosort[gui]

While the pip installation of kilosort runs, it eventually hits the following error, "error: metadata-generation-failed" (full stack included below

I am guessing that this is an issue of compatibility of PyQt6 with Ubuntu 18.04 (which we acknowledge is no longer a supported version of Ubuntu)?

As a workaround, we tried installing Kilosort4 on a python 3.7 conda environment. PyQt5 is installed instead and the installation works fine. The default pytorch version that is installed with the kilosort repo is GPU compatible and works fine. I should just note that uninstalling torch and attempting to install a GPU compatible one by hand (like the documentation suggests you do) does not work very well for this situation, from our experience trying to get this working

Collecting pyqt6 (from kilosort[gui])
  Downloading pyqt6-6.10.0.tar.gz (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 79.6 MB/s  0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Querying qmake about your Qt installation...
      Traceback (most recent call last):
        File "/home/beierlab/anaconda3/envs/kd4_ece_pieter/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/home/beierlab/anaconda3/envs/kd4_ece_pieter/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
        File "/home/beierlab/anaconda3/envs/kd4_ece_pieter/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 178, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "/tmp/pip-build-env-zooy3beu/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 28, in build_wheel
          project = AbstractProject.bootstrap('wheel',
        File "/tmp/pip-build-env-zooy3beu/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 74, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-zooy3beu/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 677, in setup
          self.update(tool)
        File "project.py", line 163, in update
      sipbuild.exceptions.UserException
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

Provide environment info:

active environment : ks4_ece_pieter active env location : /home/beierlab/anaconda3/envs/ks4_ece_pieter shell level : 7 user config file : /home/beierlab/.condarc populated config files : /home/beierlab/.condarc conda version : 24.7.1 conda-build version : 24.9.0 python version : 3.8.20.final.0 solver : libmamba (default) virtual packages : __archspec=1=zen2 __conda=24.7.1=0 __cuda=12.1=0 __glibc=2.27=0 __linux=5.4.0=0 __unix=0=0 base environment : /home/beierlab/anaconda3 (writable) conda av data dir : /home/beierlab/anaconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/bioconda/linux-64 https://conda.anaconda.org/bioconda/noarch package cache : /home/beierlab/anaconda3/pkgs /home/beierlab/.conda/pkgs envs directories : /home/beierlab/anaconda3/envs /home/beierlab/.conda/envs platform : linux-64 user-agent : conda/24.7.1 requests/2.32.3 CPython/3.8.20 Linux/5.4.0-150-generic ubuntu/18.04.6 glibc/2.27 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.8 aau/0.4.4 c/. s/. e/. UID:GID : 1000:1000 netrc file : None offline mode : False

Operating system information:

Ubuntu 18.04

pderdeyn avatar Oct 23 '25 20:10 pderdeyn

Thanks for the heads up. Unfortunately there are too many variables for us to try to debug installation issues like this. It may be a compatibility issue with Ubuntu 18.04 like you said, but it's not clear. I will just note that Python 3.7 is not included in our testing (currently 3.9 and 3.10), so it's possible that future updates to KS4 will include features that Python 3.7 does not support.

jacobpennington avatar Nov 04 '25 16:11 jacobpennington