SyntaxFix
Write A Post
Hire A Developer
Questions
It is likely that you are running the python executable from /usr/bin (Apple version) instead of /usr/loca/bin (Brew version)
You can either
a) check your PATH variable
or
b) run brew doctor
brew doctor
c) run which python
which python
to check if it is the case.