Comment 1 for bug 1851873

The installer is carefully designed to work with both python2 and
python3, but apparently this particular part of it never got run by
anyone on python3 before, wow!

This should fix it though:

Direct link to the raw version, which you should be able to download,
compare to the official version, then run with sudo sh
./ -- does this fix your issue?