Sometimes a command that is not existing will induce this error.
For example, I have a variable abc = 3 and I am trying to write it to a file (which doesn't exist and I assume python will create it on its own), then PERMISSION DENIED will present in your shell.
The first hurdle is that we need to tell the shell where to find the program. If we don't put any directory indication, computer can only run executable files located in the executable search path described by the PATH
environment variables. The current directory may not in the search path unless you put it there.
Terminal is the (graphical) "window" you can see on your computer. It is the bridge between the user and shell. Shell is the tool that gets input from user (via Terminal), executes programs and sends output to the Terminal (for user consumption). Shell itself is a program and is usually shipped with the operating system by default, especially in the UNIX-like families (including MAX OS X).
please see here
Most of the path related errors are caused by wrong current working folder. One need to run the following two commands before starting other commands to verify the current working folder:
pwd
-- prints the working directory. You can check the path name.ls
-- list directory. This shows the files in the current directory for your double check.
which pip3
to learn where is pip3 in your computer. You can also inputwhich pip
to know the location of pip.
You can also drag the pip file and pip3 file into the Visual Studio Code,after you use which
to know their location.
cat pip
to check the content.