RPI GPIOs showing as not available after some updates. Tried everything


I have just updated my rpi node red install, using a script - now 1.3.5. Ran through all the errors corrected them, and had to reinstall various items on the palette. Everything is now good except GPIO pins. Even I2c on I2C-0 works correctly from within node red.

However all the GPIO pins show as not available in node red. I have played with them on the command line gpio readall etc - they all work as expected. Node red cannot see them for some reason. I can]t see anything in the logs except this warning comment :-

'[warn] rpi-gpio : Raspberry Pi specific node set inactive'.

Is this a hint perhaps?

Please can anyone suggest where to look next?

(I tend to faff with the command line stuff - following texts and get lost if something doesn't happen as expected. I am a retired engineer but with no real knowledge of this type of OS.)

Thanks in advance


1.3.7 is the latest 1.x version available - (and 2.1.3 in the 2.x branch).
You did remember to say yes to the extra Pi nodes when you did the install ?

Usually it means that the underlying python RPi.GPIO libraries have not been installed. It should be there by default with Raspbian... but..
Maybe check the pre-reqs on the README.

Thanks for a quick reply - on the track I think but I'm not there yet.

Part of the update was from python 2.xx to 3.x. I have just run python (3.9.5) and tried the following:-
import RPi.GPIO as GPIO

I get the error 'No module named RPi' so I;m guessing that is important!

I have tried updating rpi by running:
'sudo apt-get update && sudo apt-get install python-rpi.gpio python3-rpi.gpio'

It seems to work but python still cannot see the module RPi.

What do I try next?
Postcript - just tried running Python 2.7 - RPi is imported fine as 0.6.5. The system default python is 3.9.5

SOLVED. May thanks.
I discovered python 3.5 was installed so tried running that on the command line and importing the RPi.GPIO module. It worked. I then changed the system python link to point at 3.5, restarted node red and GPIOs are back. Something not right with the python 3.9.5 installation or location I guess.

Not sure why at the moment but it works and the heating is back on.

1 Like

Unless something has changed recently, changing the default python from 2 to 3 has always been discouraged due to its likelyhood to break things

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.