Not sure if this is helpful, but under the latest copy of Raspbian I was able to install RPi.GPIO directly from the main repositories using apt-get as follows:

sudo apt-get update
sudo apt-get -y install python-rpi.gpio

If you're running Python 3 (idle3 on the command line) instead of Python 2 (python on the command line) you need to install the RPi.GPIO library with this command instead:

sudo apt-get -y install python3-rpi.gpio
Answer from PiBorg on Stack Exchange
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
installing RPi.GPIO and vs code issues - Raspberry Pi Forums
December 13, 2023 - Activate the venv and then pip install the packages, without sudo. ... I used the following command in a .ipynd file: %pip install RPi.GPIO. When I ran import RPi.GPIO in the notebook it runs perfectly. However, when I ran the same command in a .py file I get: ModuleNotFoundError: No module ...
Discussions

[Solved] Cannot install rpi.gpio
Hi, I am running the latest stable release of OSMC (4.14.26-2-osmc) on my Raspberry Pi 2 Model B. I need to install the rpi.gpio python package. First I tried sudo apt-get install python-rpi.gpio, but it failed as such package could not be found. Then I installed pip and attempted sudo pip ... More on discourse.osmc.tv
🌐 discourse.osmc.tv
0
0
March 26, 2018
Python vs Python3 apt install
Platform/operating system (i.e. Raspberry Pi with Raspbian operating system, Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): Raspbian 32-Bit Light - Raspberry Pi Zero W 2 Distributor ID: Ras... More on github.com
🌐 github.com
2
November 24, 2021
python - No module named RPi.GPIO even though it's installed - Raspberry Pi Stack Exchange
Done Reading state information... Done Package python-rpi.gpio is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'python-rpi.gpio' has no installation candidate More on raspberrypi.stackexchange.com
🌐 raspberrypi.stackexchange.com
Errors when installing on a Raspberry Pi running Bullseye
This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'python-rpi.gpio' has no installation candidate dpkg-query: package 'python-rpi.gpio' is not installed and no information is available Use dpkg --info (= dpkg-deb --info) to examine ... More on github.com
🌐 github.com
20
November 19, 2021
🌐
OSMC Forums
discourse.osmc.tv › help and support › raspberry pi
[Solved] Cannot install rpi.gpio - Raspberry Pi - OSMC Forums
March 26, 2018 - Hi, I am running the latest stable release of OSMC (4.14.26-2-osmc) on my Raspberry Pi 2 Model B. I need to install the rpi.gpio python package. First I tried sudo apt-get install python-rpi.gpio, but it failed as such package could not be found. Then I installed pip and attempted sudo pip install rpi.gpio - this time it fails with a different error: osmc@osmc:~$ sudo pip install rpi.gpio Collecting rpi.gpio Using cached RPi.GPIO-0.6.3.tar.gz Complete output from command pyth...
🌐
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 Python development source installed first! On Raspbian: $ sudo apt-get install python-dev python3-dev To install the module: $ sudo python setup.py install or $ sudo python3 setup.py install But as stated, there is version, maybe not the latest version, pre-installed with raspbian wheezy OS.
🌐
GitHub
github.com › pimoroni › st7789-python › issues › 21
Python vs Python3 apt install · Issue #21 · pimoroni/st7789-python
November 24, 2021 - Package python-rpi.gpio is not available, but is referred to by another package.
Author   lucasra1
🌐
Readthedocs
rpi-lgpio.readthedocs.io › en › release-0.4 › install.html
Installation — rpi-lgpio 0.4 Documentation
You cannot install rpi-lgpio and rpi-gpio (aka RPi.GPIO, the library it emulates) at the same time, in the same Python environment. Both packages attempt to install a module named RPi.GPIO and obviously this will not work.
Find elsewhere
🌐
Stack Exchange
raspberrypi.stackexchange.com › questions › 137359 › no-module-named-rpi-gpio-even-though-its-installed
python - No module named RPi.GPIO even though it's installed - Raspberry Pi Stack Exchange
rpi.gpio-common is already the newest version (0.7.0-0.2+b1). rpi.gpio-common set to manually installed. The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded. ... sudo apt-get -y install python-rpi.gpio Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Reading package lists...
🌐
GitHub
github.com › Seeed-Studio › grove.py › issues › 46
Errors when installing on a Raspberry Pi running Bullseye · Issue #46 · Seeed-Studio/grove.py
November 19, 2021 - This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'python-rpi.gpio' has no installation candidate dpkg-query: package 'python-rpi.gpio' is not installed and no information is available ...
Author   jimbobbennett
🌐
Raspberry Pi Forum
forum-raspberrypi.de › deutsches raspberry pi forum › programmierung › python
Fehler bei Installation python-rpi.gpi - Python - Deutsches Raspberry Pi Forum
January 23, 2023 - Ggf. kannst Du auch mal apt install python3-rpi.gpio versuchen oder per pip mit pip3 install RPi.GPIO. Autsch - Asche auf Haupt Ich hab wohl versucht eine alte Version zu installieren. V3.9.7 war, bzw. ist bereits installiert. Und erstmal alles gut. Danke aber trotzdem. . . ... Wenn pip nicht installiert ist, kann man das nach holen. ... Don’t have an account yet? Register yourself now and be a part of our community!
🌐
Geekworm Wiki
wiki.geekworm.com › How_to_Install_RPi.GPIO_Python_Library
How to Install RPi.GPIO Python Library - Geekworm Wiki
wget https://files.pythonhosted.org/packages/c4/0f/10b524a12b3445af1c607c27b2f5ed122ef55756e29942900e5c950735f2/RPi.GPIO-0.7.1.tar.gz ... This will now mean you can use the library within Python.
🌐
Adafruit
blog.adafruit.com › 2015 › 02 › 05 › how-to-fix-error-loading-rpi-gpio-python-library-on-your-brand-new-raspberry-pi-2
How To Fix Error Loading RPi.GPIO Python Library On Your Brand New Raspberry Pi 2
February 7, 2015 - The version of the RPi.GPIO Python library shipped with the latest Raspbian OS doesn’t support the Pi 2 out of the box, but you can install a later version to fix the problem. First check what version of the RPi.GPIO library is currently available ...
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
RPi.GPIO Module Not found - Raspberry Pi Forums
What model of RPi board? What Operating System is installed on the microSD card (or other boot medium)? The Python RPi.GPIO library has been a standard pre-installed component of RasPiOS (previously known as 'Raspbian') for years - it should not need to be installed.
🌐
SourceForge
sourceforge.net › home › browse › raspberry-gpio-python › wiki
raspberry-gpio-python / Wiki / install
$ sudo apt-get install python-dev python3-dev $ sudo apt-get install mercurial $ sudo apt-get install python-pip python3-pip $ sudo apt-get remove python-rpi.gpio python3-rpi.gpio $ sudo pip install hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO $ sudo pip-3.2 install hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
🌐
Raspberry Pi Forum
forum-raspberrypi.de › deutsches raspberry pi forum › programmierung › python
kein python-rpi.gpio installations kandidat - Python - Deutsches Raspberry Pi Forum
December 5, 2024 - pi@*******:~ $ sudo apt install ... is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source...
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › beginners
First time setup of pi grow kit - Raspberry Pi Forums
March 8, 2025 - Installing for Python 3.. Checking ... is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install....
🌐
PyPI
pypi.org › project › RPi.GPIO
RPi.GPIO · PyPI
Download the file for your platform. If you're not sure which to choose, learn more about installing packages. ... Filter files by name, interpreter, ABI, and platform. If you're not sure about the file name format, learn more about wheel file names. ... Details for the file RPi.GPIO-0.7.1.tar.gz.
      » pip install RPi.GPIO
    
Published   Feb 06, 2022
Version   0.7.1
🌐
GitHub
github.com › microsoft › IoT-For-Beginners › issues › 378
Cannot install necessary programs to setup Raspberry Pi. Always getting errors. · Issue #378 · microsoft/IoT-For-Beginners
May 20, 2022 - This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'python-rpi.gpio' has no installation candidate dpkg-query: package 'python-rpi.gpio' is not installed and no information is available ...
Published   May 20, 2022
Author   ritog