Sun Oct 15, 2017 1:47 am
The command line (terminal) is running a thing called bash which is a type of shell; it's a program you use to run other programs, it's how you interact with the system. Bash knows nothing about GPIOs.
The commands you are trying to run (import etc.) are not bash/system commands, they are python commands. You need to run them from within python, which is itself a program (that bash runs). There are a few ways to do this; a python IDE (integrated development environment) such as thonny is a good option.
Within python, you are trying to import a python module which allows you to talk to the GPIOs. If it's not installed, you'll have to install it (command given in an earlier post).
Once you have all that set up, the commands will work in the python script. (But not in the bash shell.)