aliBuild crashes in ubuntu 20.04

Dear Experts,

I’ve installed the new LTS version (20.04) of ubuntu and aliBuild (also aliDoctor) crashes. Here is the log:

Traceback (most recent call last):
  File "/usr/local/bin/aliBuild", line 128, in <module>
    doMain(args, parser)
  File "/usr/local/bin/aliBuild", line 43, in doMain
    "ALIBUILD_ARCHITECTURE": args.architecture
AttributeError: 'Namespace' object has no attribute 'architecture'
Traceback (most recent call last):
  File "/usr/local/bin/aliBuild", line 135, in <module>
  File "/usr/local/lib/python3.8/dist-packages/alibuild_helpers/", line 104, in report_exception
  File "/usr/local/lib/python3.8/dist-packages/alibuild_helpers/", line 73, in report
    architecture = os.environ["ALIBUILD_ARCHITECTURE"]
  File "/usr/lib/python3.8/", line 675, in __getitem__
    raise KeyError(key) from None

I’m not fluent in python but managed to track down the problem to detectArch() function in file The package platform, that’s used there, has been deprecated since python 3.5 and removed in python 3.8. Consequently, on my system with python 3.8.2, the function returns nothing, the architecture is not detected properly and everything else fails.

I know I’m using a very new distribution, but I guess soon it will become a problem for more people and other platforms with newer python. Would it be possible to fix within a reasonable timescale, or should I think about a workaround (downgrading python / using alidock, etc… )?

Hi Maciej,

I had the same problem today trying to install on an Ubuntu distro under WSL2.
Worked around it by installing Python 3.6 in pyenv and also adding “–architecture ubuntu1804_x86-64” to aliBuild.

It should actually be fixed in master. Could you check? If it does not work, could you open a ticket in JIRA? Thanks.

Hi Giulio,
Indeed it works flawlessly when the master branch is used. Thanks!

I’ve “release a new aliBuild” as an action item since a while. I will try to get at it today.