macOS build fails on `brew link` command while pouring python-3.7.6_1.high_sierra.bottle.tar.gz

I had this issue as well. In my case, installing graphviz pulled in python3.

brew unlink python@2

took care of my situation.