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
🌐
PyPI
pypi.org › project › RPi.GPIO
RPi.GPIO · PyPI
pip install RPi.GPIO Copy PIP instructions · Latest version · Released: Feb 6, 2022 · A module to control Raspberry Pi GPIO channels · These details have been verified by PyPI · croston · These details have not been verified by PyPI · ...
      » pip install RPi.GPIO
    
Published   Feb 06, 2022
Version   0.7.1
Discussions

python 3.x - Installing pip in Raspberry pi3 - Stack Overflow
Communities for your favorite technologies. Explore all Collectives · Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work More on stackoverflow.com
🌐 stackoverflow.com
raspberry pi - Trying to install Python 3 package RPi.GPIO - Stack Overflow
I am having difficulty installing the RPi.GPIO package for Python 3 on Raspberry Pi. I am getting this error: python3-rpi.gpio is not available, but is referred to by another package. This might m... More on stackoverflow.com
🌐 stackoverflow.com
[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 … More on discourse.osmc.tv
🌐 discourse.osmc.tv
0
0
March 26, 2018
python - RaspBerry doesn't find pip3 - Stack Overflow
Again, I'm using Arch Linux ARM ... for the RPi platform. But that package should be called about the same as in Arch :) ... Sign up to request clarification or add additional context in comments. ... Timothy Lukas H. Timothy Lukas H. Over a year ago · Installed it like you mentioned. And then entered: pip3 install RPI.GPIO ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Pi My Life Up
pimylifeup.com › home › how to install pip on the raspberry pi
How to install pip on the Raspberry Pi - Pi My Life Up
April 1, 2025 - Alternatively, you can still get pip to install Python packages despite the managed environment by usign the “–break-system-packages” option. In your case you would use “pip install rpi-rotary-encoder --break-system-packages“.
🌐
Raspberry Pi
projects.raspberrypi.org › en › projects › using-pip-on-raspberry-pi
Using pip on Raspberry Pi
Under normal circumstances, you should only be using Python 3 and therefore pip3. You can install modules using the pip3 install command.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
installing RPi.GPIO and vs code issues - Raspberry Pi Forums
December 13, 2023 - I tried executing the following commands in a .py file: from mfrc522 import SimpleMFRC522 import PRi.GPIO as GPIO I initially got an error: ModuleNotFoundError: No module named 'mfrc522' but I quickly resolved in by running %pip install mfrc522 As expected when I ran the code again I got: ...
🌐
Raspberry Pi Spy
raspberrypi-spy.co.uk › home › python › install rpi.gpio python library
Install RPi.GPIO Python Library - Raspberry Pi Spy
February 16, 2015 - On the latest image RPi.GPIO is already included and doesn’t need installing separately. ... Packages on PyPi are installable with pip, and you should only need to download their archives if your device has no internet and/or pip.
Find elsewhere
🌐
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
🌐
Geekworm Wiki
wiki.geekworm.com › How_to_Install_RPi.GPIO_Python_Library
How to Install RPi.GPIO Python Library - Geekworm Wiki
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/pypi/RPi.GPIO and the current version is 0.7.1 (Feb 6, 2022).
🌐
Fleetstack
fleetstack.io › blog › install-pip-raspberry-pi-guide
Effortlessly Install Pip on Your Raspberry Pi
April 3, 2024 - Dive into the world of Python development on your Raspberry Pi by installing Pip, Python's package installer. This comprehensive guide covers everything you need to know to install Pip on your Raspberry Pi, ensuring you can manage Python packages with ease. Perfect for beginners and seasoned ...
🌐
RaspberryTips
raspberrytips.com › install-python-packages-on-raspberry-pi
How to Install and Use Python Packages on Raspberry Pi? – RaspberryTips
June 11, 2025 - Most of the Python packages for Raspberry Pi are available in the APT repositories. Searching for the library name with this tool will be the fastest way to install them. Another tool named “PIP” can also be used for some other modules not included in the default repositories.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › troubleshooting
sudo pip3 installation on python virtual environment issues - Raspberry Pi Forums
July 15, 2024 - pip install rpi_ws281x pip install adafruit-circuitpython-neopixel pip install adafruit-blinka Note this fails as there is a typing error in circuitpython
🌐
OSMC Forums
discourse.osmc.tv › help and support › raspberry pi
[Solved] Cannot install rpi.gpio - Raspberry Pi - OSMC Forums
March 26, 2018 - 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...
🌐
Pantech
pantechsolutions.net › home › blog › installing library package in raspberry pi-chapter 2
Installing Library package in Raspberry Pi-Chapter 2 - Pantech.AI
February 1, 2022 - For installing Package, the APT command can be used, the apt-get command is available in every Linux based OS. If some package is not available in APT command, those Packages and libraries can be installed using PIP command (Python Package Index)
🌐
Mryslab
mryslab.github.io › s3-extend › pip_update
Verifying/Install pip3 - Scratch 3 OneGPIO Extensions
If you are a Windows user or using Raspberry PI OS on the Raspberry Pi, pip should be available to you without any additional installation steps. However, you will need to make sure that you are using the latest version.
Top answer
1 of 4
63
sudo apt-get install python3-pip

This should install pip3 for managing Python3 libraries. If you're using rasbian that is.
python-pip is for Python2 (as of 2019-09-09) if you need that too.

pip and python are two separate entities. There for installing one doesn't necessarily mean the other will be installed.

Some good documentation on the matter can be found at raspberrypi.org

And others have asked the same question on the official forums.

Just remember, most "safe" distro's tend to default to Python2 for their LTS platforms pre 2020. Meaning you will have to essentially add python3-<lib> (the 3 being the crucial element here) to all your installations. Otherwise you'll most likely get the Python2 equivilant of the library/tool for as long as Python2 is the default python environment in your distro. Like in this case.

Again, I'm using Arch Linux ARM for the most part, so I'm not to familiar with debian/ubuntu/etc distro's for the RPi platform. But that package should be called about the same as in Arch :)

2 of 4
1

Even though Python3 install 'should' install the latest pip with it, in mho, it does not. If you have a previous version of Python it likely has the previous version of pip. To install the latest version after installing python3:

python3 -m pip install --upgrade pip

This could lead to issues with other python versions or other programs using previous pip version.

See here on resolving the issues: https://github.com/pypa/pip/issues/5599

On linux, you could use: sudo apt install python3-pip

🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › beginners
install python packages via apt or pip? - Raspberry Pi Forums
Hello, Basically, pip is specialized for python packages/modules type of stuff. This is not for OS wide packages, only python specific packages. In general most OS packages on Raspbian you'll be installing with apt. But pip is also important for Python specific packages.