You may install it with pip :

pip install RPi.GPIO
Answer from Timothée on Stack Overflow
Discussions

python - Installing RPi.GPIO on Ubuntu Core - Raspberry Pi Stack Exchange
Done E: Unable to locate package ... regex 'python3-rpi.gpio' That should work for Raspbian but it seems to me Ubuntu Core might not have a python GPIO package - I hope I'm wrong. Can anyone help, please? I desperately need to interface with GPIO or all my hard work is for nought. ... sudo apt-get install ... More on raspberrypi.stackexchange.com
🌐 raspberrypi.stackexchange.com
March 20, 2018
raspbian - RPi.GPIO under Python 3 - Raspberry Pi Stack Exchange
sudo apt-get install python-rpi.gpio python3-rpi.gpio More on raspberrypi.stackexchange.com
🌐 raspberrypi.stackexchange.com
May 4, 2015
raspberry pi3 - RPi.GPIO Not Found in Python 3 - Stack Overflow
I am trying to get the GPIO module working on a Raspberry Pi 3B+. I have installed the libraries as below. It works fine in Python2 but not Python 3 (version 3.9). Any ideas would be appreciated. pi@ More on stackoverflow.com
🌐 stackoverflow.com
February 3, 2021
How to install python3-lgpio on Ubuntu 20.04 on a Raspberry Pi - Stack Overflow
I'm following a tutorial on How to use the Raspberry Pi GPIO headers with ubuntu and one of the steps is installing python3-lgpio using sudo apt install python3-lgpio and I get E: Unable to locate More on stackoverflow.com
🌐 stackoverflow.com
🌐
Readthedocs
rpi-lgpio.readthedocs.io › en › release-0.4 › install.html
Installation — rpi-lgpio 0.4 Documentation
You cannot install rpi-lgpio and ... rpi-lgpio in its archive of apt packages, then you can simply: $ sudo apt remove python3-rpi.gpio $ sudo apt install python3-rpi-lgpio...
🌐
SourceForge
sourceforge.net › home › browse › raspberry-gpio-python › wiki
raspberry-gpio-python / Wiki / install
$ sudo pip uninstall RPi.GPIO $ sudo pip-3.2 uninstall RPi.GPIO $ sudo apt-get install python-rpi.gpio python3-rpi.gpio
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
RPi.GPIO Module Not found - Raspberry Pi Forums
pi@Pi3B:~ $ sudo apt-get install python3-rpi.gpio Reading package lists... Done Building dependency tree Reading state information... Done python3-rpi.gpio is already the newest version (0.7.0-0.1~bpo10+4). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › community › general discussion
python-rpi.gpio - Raspberry Pi Forums
If you are using Raspbian, all you need to do to install the latest release is: $ sudo apt-get update $ sudo apt-get dist-upgrade $ sudo apt-get install python-rpi.gpio python3-rpi.gpio ------------ If you want to build your own version from this downloaded copy, make sure that you have the ...
🌐
Caretech
caretech.io › 2018 › 01 › 20 › using-the-rpi-gpio-module-with-python-3
Using the RPi.GPIO module with Python 3 – CareTech Computing
Confirm upgrades when prompted, by entering Y for yes; let it proceed. When updates are finished running, it’s time to install the GPIO module for Python 3: sudo apt install python3-rpi.gpio · The appropriate packages should download and install.
Find elsewhere
🌐
Geekworm Wiki
wiki.geekworm.com › How_to_Install_RPi.GPIO_Python_Library
How to Install RPi.GPIO Python Library - Geekworm Wiki
sudo apt-get update · Then attempt to install the RPi.GPIO package : sudo apt-get install rpi.gpio · If it isn’t already installed it will be installed. If it is already installed it will be upgraded if a newer version is available. The package is available from http://pypi.python.org/...
🌐
GitHub
github.com › BPI-SINOVOIP › RPi.GPIO › blob › master › INSTALL.txt
RPi.GPIO/INSTALL.txt at master · BPI-SINOVOIP/RPi.GPIO
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio · · ------------ · If you are not using Raspbian, it is recommended that you install this module using pip: $ sudo pip install RPi.GPIO · · ------------ · If you want to build ...
Author   BPI-SINOVOIP
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
help information about how to install RPi-GPIO on "Ubuntu " - Raspberry Pi Forums
Any information about how to install RPi-GPIO on "Ubuntu MATE 15.04" for my Raspberry Pi 2 model b will welcome. (System is very stable with this version of Ubuntu MATE 15.04) Thanks, Best Regard Jose ... sudo apt-get install python3-pip sudo pip-3.2 install RPi.GPIO and replace 3.2 with the ...
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
python3-RPi.GPIO problem - Raspberry Pi Forums
November 10, 2021 - ... Languages using left-hand ... list. The use of crystal balls and mind reading is prohibited. ... DougieLawson wrote:sudo apt-get install python{,3}-pip sudo pip3 install RPi.GPIO Thank You very much......
🌐
Readthedocs
rpi-lgpio.readthedocs.io › en › release-0.5 › install.html
Installation — rpi-lgpio 0.5 Documentation
$ sudo apt install python3-lgpio $ sudo apt remove python3-rpi.gpio $ python3 -m venv --system-site-packages sysvenv $ source sysvenv/bin/activate (sysvenv) $ pip3 install rpi-lgpio
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
installing RPi.GPIO and vs code issues - Raspberry Pi Forums
December 13, 2023 - You can override this, at the risk ... is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install....
🌐
Stack Overflow
stackoverflow.com › questions › 66013812 › rpi-gpio-not-found-in-python-3
raspberry pi3 - RPi.GPIO Not Found in Python 3 - Stack Overflow
February 3, 2021 - pi@raspberrypi:/usr/bin $ sudo apt-get install python-rpi.gpio python3-rpi.gpio Reading package lists... Done Building dependency tree Reading state information... Done python-rpi.gpio is already the newest version (0.6.5~stretch-1). ...
🌐
Stack Overflow
stackoverflow.com › questions › 70903849 › how-to-install-python3-lgpio-on-ubuntu-20-04-on-a-raspberry-pi
How to install python3-lgpio on Ubuntu 20.04 on a Raspberry Pi - Stack Overflow
I tried locating the package manually from here and installing it manually using sudo dpkg -i python3-lgpio and I get · dpkg: dependency problems prevent configuration of python3-lgpio: python3-lgpio depends on python3 (>= 3.9~); however: Version ...
🌐
Ubuntu
ubuntu.com › tutorials › gpio-on-raspberry-pi
How to use Raspberry Pi GPIO pins with Ubuntu | Ubuntu
sudo apt install python3-lgpio · Done. You’re ready to go. The first example is the classic “blink an LED” example. The sample script uses GPIO pin 23 on the Raspberry Pi, so we’ll wire it up with a 330-ohm resistor according to the ...