I've read many of the other answers on here to try and get this working, but for some reason it won't. I've already changed permissions and made the .py executable with chmod +x <myscript.py>, and I've copied the file into my /usr/local/bin which is already in my PATH by default on OSX, however, I still can't execute the script unless I'm in the directory where it's located.
In addition, I'm a little confused on how the header works. I currently have #!/usr/bin/python because when I changed it to #!/usr/local/bin to match the directory, when I ran the script my terminal said I had a "bad interpreter."
I know this topic has been on here a lot, but the other fixes haven't worked. Thanks in advance.