Nrpgio Python command not running

After having a trawl through some other threads I found this command suggested by @dceejay on this post Rpi-gpio input node "stopped"

sudo apt-get install rpi.gpio

This appears to have solved the issue and the pin is now working as it should. Thank you to everyone for your help. Would have been lost on my own!