distutils has not been included in the Python distribution since version 3.10. However, setup.py still requires distutils to install version 6.0.1. I’m not a Python installation geek, so it’s difficult for me to work around the problem with distutils. I considered installing in a virtual environment. But this type of installation seems like a cop-out to me. Why not make the Gramps installation method PEP 517/518 compliant?
In the meantime, I’ll stick with version 6.0.0 as provided by Kubuntu.
ven avr 18 20:21 $ python3 setup.py build
/usr/lib/python3/dist-packages/_distutils_hack/__init__.py:54: UserWarning: Reliance on distutils from stdlib is deprecated. Users must rely on setuptools to provide the distutils module. Avoid importing distutils or import setuptools first, and avoid setting SETUPTOOLS_USE_DISTUTILS=stdlib. Register concerns at https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml
warnings.warn(
Traceback (most recent call last):
File "/home/pierre/opt/Gramps/gramps-6.0.1/setup.py", line 35, in <module>
from setuptools import setup, Command
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 24, in <module>
from . import logging, monkey
File "/usr/lib/python3/dist-packages/setuptools/logging.py", line 5, in <module>
from . import monkey
File "/usr/lib/python3/dist-packages/setuptools/monkey.py", line 13, in <module>
import distutils.filelist
ModuleNotFoundError: No module named 'distutils'
I understand that everything is in everything! Once the switch to pip installation is complete, Gramps will be able to “upgrade” to Python 3.10+ and this should happen with version 6.1. But until then, installing via a local build no longer works on Kubuntu 24.10 which uses Python 3.12.7