I have a python code which works perfectly and i want to make it more user friendly to run, so i copied the code in a new file called codee.command , wrote #!/usr/local/bin/python3
at the beginning and used chmod 770 codee.command
.
Then i tried double clicking on the file but it returned the following error:
/Users/serax/Desktop/Code/digits_exec.command ; exit;
zsh: /Users/serax/Desktop/Code/digits_exec.command: bad interpreter: /usr/bin/python3^M: no such file or directory
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed
I have worked on this code on vscode and I used python 3.9.6 which is installed in /usr/local/bin/
.
I also tried with #!/usr/bin/python3
(which contains python 3.8.2, that is not the interpreter i want) but it gives the same error.
I now tried with #!/usr/local/bin python3
and it says permission denied
.
Apparently my question is a duplicate of