I have 2 python versions installed under my mac osx sierra: python 3.5 python 2.7
I installed pyinstaller under python3.5 with this command:
python3
Finally, this version drops support for Python 2.7, which is end-of-life since January 2020.. The minimum required version is now Python 3.5. The last version supporting Python 2.7 was PyInstaller 3.6.
pip install pyinstaller==3.6
So if anybody using python 2.7 version, Just install pyinstaller3.6 version and run it will work fine.