Search code examples
pythonmacospermission-denied

Newbie in Python zsh: permission denied: /Users/myName


I'm trying to run Python on Terminal and typed in ~ $python but I get this error message

~ $python3
zsh: permission denied: /Users/myName
  • I dragged Python folder in the Terminal and I'm denied
  • I also checked the permission of the folder, I already changed it to read & write
  • I searched on some similar questions here but still no idea what to do

Solution

  • The shell will expand ~ to the name of your home directory and probably $python3 to an empty string (since there is probably no shell variable named python3), so the whole thing is equivalent to just typing the name of your home directory, which obviously cannot be executed as a command.

    You probably want to type just python3.