pip install splunk-sdk fails on Python 3.12: Getting requirements to build wheel did not run successfully

pip install splunk-sdk blows up on Python 3.12. The install fails while building the wheel for splunk-sdk 1.7.4, with "Getting requirements to build wheel did not run successfully" and a subprocess-exited-with-error traceback coming from inside setuptools' build_meta. Same command works fine on Python 3.11 and earlier. The root cause is SDK 1.7.4's old setup.py pinned against dependency versions that dont build on 3.12.

Upgrade the SDK. Splunk published v2.0.0 with official Python 3.7+ support, which fixes the 3.12 build failure, and then v2.0.1 to add a missing dependency (the deprecation package) that 2.0.0 forgot to declare. Run: pip install --upgrade splunk-sdk and make sure you land on 2.0.1 or newer. The original reporter confirmed v2.0.1 installs and runs clean on Python 3.12, then closed the issue as resolved.

Source: https://github.com/splunk/splunk-sdk-python/issues/548

Source: https://github.com/splunk/splunk-sdk-python/issues/548