How to make python file executable in Mac terminal

0 votes
asked Nov 7 by ubuntu (106 points)

I am using Mac OS High Sierra, I have python file that I need to able to run via Mac terminal .
How can I do that.

1 Answer

0 votes
answered Nov 7 by basher (104 points)

to make python file executeable you have to execute following command in bash/terminal.

chmod +x

and execute file via


your file permission will be set to -rwxr-xr-x when you see it via ls -l