Can't get the program in this article to run

I’ve been learning from the CodeAcademy course and I was linked this article :

which makes it seem easy. I installed Python and copypasted the text, which didn’t run, so I set about trying to install the libraries.

python - import error for pyautogui - Stack Overflow - are the instructions I followed. I got to the base command line which is :

C:\Users\my user name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.9>pip install pyautogui

‘pip’ is not recognized as an internal or external command, operable program or batch file.
Is what I get as an error message.

Am I totally barking up the wrong tree here? The instructions seem to suggest this is a beginner-level exercise unless there is something totally obvious I am missing.

Did you google the error message, “‘pip’ is not recognized as an internal or external command, operable program or batch file.”?

It means that pip is not installed on the PATH environment variable. You have to figure out where you installed pip.
Try:

There’s also a lot of similar threads on this topic in the forums.

1 Like

I got the libraries installed, but still cannot run the program itself.

In order to run python packages pip needs to be installed in the correct location (ie: the PATH variable. Think of the PATH variable like a map of directories inside the “guts” of your computer. Or, “Essentially, it’s just a variable that stores a bunch of shortcuts.” So you don’t have to write out the absolute path each time you run something on your computer from the cmd line).
See: https://john-dugan.com/path-variable-in-windows/

I’m assuming that b/c you’re on a windows machine you had to install pip manually. So, the question is where was it installed?

What happens when you type:
pip -V

and then:
echo %PATH%