--- a/bindings/python/setup.py	2024-11-12 14:29:25.000000000 +0100
+++ b/bindings/python/setup.py	2025-01-05 17:00:00.000000000 +0100
@@ -8,7 +8,7 @@
 from setuptools.command.build_ext import build_ext as orig_build_ext
 from setuptools.command.sdist import log
 from setuptools.command.sdist import sdist as orig_sdist
-from setuptools.errors import BaseError
+from distutils.errors import DistutilsError as BaseError
 
 LINK_SYSTEM_LIBGPIOD = getenv("LINK_SYSTEM_LIBGPIOD") == "1"
 LIBGPIOD_MINIMUM_VERSION = "2.1"
