'spyder' fails to launch without 'setuptools' package in Python 3.12+
Author: flemmelCreated Jun 22, 2025Updated Sep 15, 2026
Labelstype:BugOS:MacOS
What happened
spyder (v6+) fails to start if the setuptools package is not installed.
This occurs in Python 3.12+, where setuptools is no longer included by default in new Python virtual environments.
Steps to reproduce
1. Create a new virtual environment (Python 3.12+)
$ python3.12 -m venv .venv
$ source .venv/bin/activate
# Note: setuptools is not listed
$ pip list
Package Version
------- -------
pip 25.0.12. Install Spyder in the virtual environment (without setuptools)
(.venv) $ pip install spyder3. Try to run Spyder (without setuptools)
(.venv) $ spyder
...
File "/private/tmp/spyder/.venv/lib/python3.12/site-packages/spyder/api/widgets/menus.py", line 23, in <module>
from spyder.utils.qthelpers import add_actions, set_menu_icons, SpyderAction
File "/private/tmp/spyder/.venv/lib/python3.12/site-packages/spyder/utils/qthelpers.py", line 71, in <module>
import applaunchservices as als
File "/private/tmp/spyder/.venv/lib/python3.12/site-packages/applaunchservices/__init__.py", line 33, in <module>
from distutils.version import LooseVersion as V
ModuleNotFoundError: No module named 'distutils'4. Install setuptools manually
(.venv) pip install setuptools
...
Successfully installed setuptools-80.9.05. Retry running Spyder (with setuptools installed)
(.venv) spyder
... # now it is workingSuggested fix
Add setuptools as an explicit dependency in setup.py to ensure it's installed automatically.
Environment
This was tested on:
- macOS (Apple M2)
- Python 3.12+
- Spyder 6+
Source: spyder-ide/spyder