It looks as though the speedtest-cli is no longer compatible with Ubuntu 20.04 where it is now python3. I did install the one from speedtest.net/apps/cli and ...
Command line interface for testing internet bandwidth using speedtest.net. Latest Version Travis License. Versions. speedtest-cli works with Python 2.4-3.7.
Internet connection measurement for developers. Speedtest CLI brings the trusted technology and global server network behind Speedtest to the command line.