weewx-4.0.0 $ python3 ./setup.py buildTraceback (most recent call last): File "./setup.py", line 25, in <module> from distutils import logImportError: cannot import name 'log' from 'distutils' (/usr/lib/python3.7/distutils/__init__.py)
I had the same Problem solved with:
sudo apt install python3-pip
sudo apt-get install python3-distutils