Skip to content

GUI fails to launch with latest setuptools version #1206

@JvB22

Description

@JvB22

Describe the issue:

Dear developers,

I had some issues when installing suite2p manually in my Python environment, and launching the gui:

python -m suite2p Traceback (most recent call last): File "C:\Users\User\AppData\Roaming\uv\python\cpython-3.10.18-windows-x86_64-none\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\User\AppData\Roaming\uv\python\cpython-3.10.18-windows-x86_64-none\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "G:\venvs\calcium\lib\site-packages\suite2p\__main__.py", line 69, in <module> main() File "G:\venvs\calcium\lib\site-packages\suite2p\__main__.py", line 64, in main from suite2p import gui File "G:\venvs\calcium\lib\site-packages\suite2p\gui\__init__.py", line 4, in <module> from .gui2p import run File "G:\venvs\calcium\lib\site-packages\suite2p\gui\gui2p.py", line 11, in <module> from . import menus, io, merge, views, buttons, classgui, traces, graphics, masks, utils, rungui File "G:\venvs\calcium\lib\site-packages\suite2p\gui\menus.py", line 6, in <module> from pkg_resources import iter_entry_points ModuleNotFoundError: No module named 'pkg_resources'

This is due to the fact that pkg_resources is deprecated since setuptools 82.0.0, as was warned using version 81.0.0:

G:\venvs\calcium\lib\site-packages\suite2p\gui\menus.py:6: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. from pkg_resources import iter_entry_points

As the error message describes, fixing setuptools to a version <81.0.0 fixed the issue for me.
I suspect that fixing the version of setuptools in setup.py or using an alternative method should fix the issue for other users as well.

Provide environment info:

uv pip list
Using Python 3.10.18 environment at: calcium
Package Version


cellpose 4.0.8
colorama 0.4.6
contourpy 1.3.2
cycler 0.12.1
fastremap 1.17.7
filelock 3.21.2
fill-voids 2.1.1
fonttools 4.61.1
fsspec 2026.2.0
imagecodecs 2025.3.30
importlib-metadata 8.7.1
jinja2 3.1.6
joblib 1.5.3
kiwisolver 1.4.9
llvmlite 0.46.0
markupsafe 3.0.3
matplotlib 3.10.8
mpmath 1.3.0
natsort 8.4.0
networkx 3.4.2
numba 0.63.1
numpy 2.2.6
opencv-python-headless 4.13.0.92
packaging 26.0
pillow 12.1.1
pygments 2.19.2
pyparsing 3.3.2
pyqt6 6.10.2
pyqt6-qt6 6.10.2
pyqt6-sip 13.11.0
pyqtgraph 0.14.0
python-dateutil 2.9.0.post0
qtpy 2.4.3
rastermap 1.0
roifile 2025.12.12
scanimage-tiff-reader 1.4.1.4
scikit-learn 1.7.2
scipy 1.15.3
segment-anything 1.0
setuptools 80.0.0
six 1.17.0
suite2p 1.0.0.1
superqt 0.7.8
sympy 1.14.0
threadpoolctl 3.6.0
tifffile 2025.5.10
torch 2.10.0
torchvision 0.25.0
tqdm 4.67.3
typing-extensions 4.15.0
zipp 3.23.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions