When trying to use any hg Mercurial commands on the console, I keep getting this error.
I installed Python using Homebrew and I am running Mac OS Catalina v. 1
I had this issue recently (2020, May) with Google's GCP CLI. It also works on the obsolete Python 2.7.
This is a borked Python 2 installation problem. mBrew no longer correctly installs Python 2 gracefully, as no one cares about abondonware.
Conda still installs Python 2 in an environment; I did that.