Sudo command not found

I working on Pi5 1.1.1 Blinking Led and I am at this prompt:

~/raphael-kit/python-pi5 $

I enter this command:

sudo 1.1.1_BlinkingLed_zero.py

this is the response:

sudo: 1.1.1_BlinkingLed_zero.py command not found

Help !

Not sure where you’ve picked up the _zero suffix from but the command should be

sudo python3 1.1.1_BlinkingLed.py

Sorry, I didnt see you were running the rpi5 variant. My mistake. Ignore what I said! You’ve simply missed out the python3 command itself

sudo python3 1.1.1_BlinkingLed_zero.py

There is no files named “python3 1.1.1_BlinkingLed_zero.py” under “raphael-kit/python-pi5” directory.
I see files named such as “1.1.1_BlinkingLed_zero.py”.
I was thinking that the sudo command would execute that file, but I get the response “sudo: 1.1.1_BlinkingLed_zero.py command not found”.

Im a bit confused now as to what youve done.

Agreed, there is no file called

python3 1.1.1_BlinkingLed_zero.py

in that directory.

The file to run is simply

1.1.1_BlinkingLed_zero.py

You run this file using the command

python3

The sudo prior command simply raises the privileges to be root. It does not execute anything.

So the full command is the 3 elements as I posted above

sudo python3 1.1.1_BlinkingLed_zero.py

When I enter the sudo command as you have shown, I get several screens of error messages. Too much to copy manually now. I will have to see if I can find a way to show you all the error messages. I’ll get back to this later…got to go for now.

Thanks for the help

That’s good news! The command is now being found.

You should just be able to copy those error messages from the terminal (shift ctrl-c) and paste into this forum with ctrl-v. If there’s many pages of them, just the last one shown on screen should normally suffice.

Now, it’s working. Were you able to change some files or setting on my pi5? You said that that pyhton3 command was found: now my Pi5 can find it?

Again thanks.

Im not able to change anything on your rpi5.

However, you told me that you see many errors now, instead of

command not found 

Therefore, the command must now be being found.

Thanks for the help. I’m good, for now.

1 Like