sip-build crashes, what is going on?

I am trying to diagnose a problem with sip-build. Whenever it is invoked, it crashes with the following message:

# sip-build --version
Traceback (most recent call last):
  File "/bin/sip-build", line 33, in <module>
    sys.exit(load_entry_point('sip==6.1.1', 'console_scripts', 'sip-build')())
  File "/bin/sip-build", line 25, in importlib_load_entry_point
    return next(matches).load()
StopIteration

If I choose to uninstall sip6 and try with sip5 instead but the result is the same. I did some internet searches and it seems that this problem may be caused by multiple versions of python living together in an installation.

Has anyone had this problem before? Suggestions on how to overcome it? I am using openSUSE Tumbleweed.

Thanks in advance!

Can you share the /bin/sip-build script? Try:

susepaste -n VariableStar -f python -e 151200 /bin/sip-build

And share the link.

Thank you for your answer, marel. Here comes the link

https://susepaste.org/66940391

It apparently returns this code (sorry, not familiar with susepaste).

#!/usr/bin/python3.8
# EASY-INSTALL-ENTRY-SCRIPT: 'sip==6.1.1','console_scripts','sip-build'
import re
import sys

# for compatibility with easy_install; see #2198
__requires__ = 'sip==6.1.1'

try:
    from importlib.metadata import distribution
except ImportError:
    try:
        from importlib_metadata import distribution
    except ImportError:
        from pkg_resources import load_entry_point


def importlib_load_entry_point(spec, group, name):
    dist_name, _, _ = spec.partition('==')
    matches = (
        entry_point
        for entry_point in distribution(dist_name).entry_points
        if entry_point.group == group and entry_point.name == name
    )
    return next(matches).load()


globals().setdefault('load_entry_point', importlib_load_entry_point)


if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(load_entry_point('sip==6.1.1', 'console_scripts', 'sip-build')())


I just realized that sip4, that was also installed, was the culprit. I just uninstalled it and things go fine:

> sip-build --version
6.1.1

Thank you for your interest anyway, marel!

Did it worked after uninstalling it?

That is what he says.