python3 won't run from mac shell script
You could create ~./bash_profile
file and export the path to python 3 bin folder, it would look like
export PATH=“path-to-python3-bin-folder:$PATH”
Every time that you enter Terminal, type source ~./bash_profile
and now you can call python3 as a function in terminal to call your code.
On the other hand, I would recommend you to download Anaconda, as you can create virtual environments easily with the version of python that you’d like.