I was trying to set up my Mac to run custom Python scripts from anywhere without having to type python [script.py]
or the explicit file path.
The script is called "testscript". I put the script in my own bin directory (separate from /usr/local/bin
), called /User/Patrick/bin
, and added it to my path so when I type echo $PATH
it comes up correctly like so:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/User/patrick/bin:/usr/local/go/bin`.
I already added the line #!/usr/bin/env python
to the top of the file, I already did chmod 700 testscript
, but I still can't call testscript
from anywhere.
Have things changed since OSX Yosemite?
~/bin/testscript
work?/User**s**
, at least here.