So it turned out I had Python 3.8.7 installed together with Python 3.9.7.  So uninstalling the older one solved the problem...
I can install, uninstall and upgrade prettytable using pip [un]install [-U] prettytable.  But running the mbed-tools compile command keeps on reporting "ModuleNotFoundError: No module named 'prettytable'"
I can see the package is added to my ...\appdata\local\programs\python\python39\Lib\site-packages\ folder.  According to my environmental path the folder ...\appdata\local\programs\python\python39\Scripts\ is added and many packages has en .exe file installed there, but prettytabe is missing.  Could this be the problem?  If so, how do I install it and ensure that it actually has en exe install too?
I'm running python 3.9.7 on pretty-much-the-latest Windows 10.
How to fix prettytable installation