How to install Python on macOS Catalina using homebrew?
chown the usr/local directory:
sudo chown -R $(whoami) /usr/local
Then try to install python3 again and it should work:
brew install python3
OR,
You can try this also if the above solution didn't help
sudo chown -R $(whoami) $(brew --prefix)/*
Reference: https://gist.github.com/irazasyed/7732946