python3
pays no attention to the PATH
variable when looking for scripts. This variable controls where the shell looks for executables.
So what should work now, provided the script has executable permissions and a valid shebang like #!/usr/bin/env python3
as its very first line, is that simply
facemorpher
without python3
in front should run the script. Perhaps this is actually what you want and need.
The python3
command without any options expects a file name parameter; there is no simple way to make it look for a file which doesn't exist in the specified directory (which is the current working directory if the filename doesn't have an explicit directory part; this is how the operating system resolves relative file names, and should probably not be messed with for an individual command). For further details about this, perhaps see also Difference between ./
and ~/
For the record, chmod a+x path/to/scriptname
adds execute permission to the script for all users on the system, and the path in the shebang after #!
should point to your Python interpreter's full path, or the full path to a utility like env
which finds it on your PATH
and executes it based on just the command name (here, python3
; but on some systems, the Python interpreter executable's file name is just python
, or more broadly whatever the system's owner decided to name it).