To install pip for Python 3 on Ubuntu, first update your package repository and then install the python3-pip package using sudo apt update followed by sudo apt install python3-pip.

After installation, verify the setup by checking the version with pip3 --version. To ensure you have the latest version, upgrade pip using sudo pip3 install --upgrade pip.

  • Prerequisites: You need an Ubuntu system with a user account that has sudo privileges and access to the terminal.

  • Verification: If pip3 --version returns a number, the software is configured correctly; otherwise, you may need to install Python 3 first via sudo apt install python3.

  • Alternative Methods: If the package manager method fails or you lack root access, you can bootstrap pip by downloading get-pip.py and running it with python3 get-pip.py, though this may leave the system in an inconsistent state if not managed carefully.

  • Virtual Environments: For project-specific isolation, it is recommended to create a virtual environment using python3 -m venv my_env and then activate it before installing packages.

I believe that you can install it on Ubuntu with

sudo apt-get install python-pip

or

sudo apt-get install python3-pip

for Python 3. Sure, it's an older version but its functionality is there.

Answer from Michael Zhang on Stack Overflow
Discussions

How can i install pip on ubuntu touch | UBports Forum
I want to use python-pip on ubuntu touch but i cant install: hablet@ubuntu-phablet:~$ sudo apt install python3-pip [sudo] password for phablet: Sorry, try ag... More on forums.ubports.com
🌐 forums.ubports.com
September 25, 2025
Help with installing Python packages on Ubuntu 24.04.
As of Ubuntu 24.04, there are two options: * install python pacakges/modules system wide via "sudo apt install python3-" ... which is not the case for pytube because: not avaiable as ubuntu package * create a python venv (virtual env), and from there install via pip. Let me know if you need help with that venv step More on reddit.com
🌐 r/Ubuntu
22
7
August 9, 2024
How do I install python?
Chances are it's already installed. In terminal you can type python3 --version and it will tell you if it is installed already. More on reddit.com
🌐 r/Ubuntu
11
4
February 25, 2021
how to install the latest version of pip

Python 2.x: sudo apt install python-pip

Or

Python 3.x: sudo apt install python3-pip

More on reddit.com
🌐 r/Ubuntu
5
1
December 15, 2019
🌐
pip
pip.pypa.io › en › stable › installation
Installation - pip documentation v26.0.1
There are also zip applications for specific pip versions, named pip-X.Y.Z.pyz. The zip application can be run using any supported version of Python: ... You may need to configure your system to recognise the .pyz extension before this will work. Depending on how you installed Python, there might be other mechanisms available to you for installing pip such as using Linux package managers.
🌐
Hivelocity
hivelocity.net › home › knowledge base articles › how to install pip on ubuntu
How to install PIP on Ubuntu in 4 Easy Steps - Hivelocity Hosting
January 11, 2024 - In this guide we’ll be covering the process to install PIP on Ubuntu using the command line.
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-pip-in-ubuntu
How to install PIP in Ubuntu? - GeeksforGeeks
July 23, 2025 - In this guide, we’ll show you how to install PIP in Ubuntu so you can easily manage your Python libraries and streamline your development workflow.
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install pip on ubuntu
How to Install Pip on Ubuntu
December 11, 2025 - This guide explained how to install Pip on Ubuntu for Python 3.
Find elsewhere
🌐
Cherry Servers
cherryservers.com › home › blog › cloud computing › how to install pip on ubuntu 22.04 | step-by-step
How to Install PIP on Ubuntu 22.04 | Step-by-Step | Cherry Servers
May 25, 2023 - This step-by-step pip tutorial will show you how to install pip on Ubuntu 22.04. In addition, you will learn how to install and manage installed packages.
Top answer
1 of 4
133

PyPI is the Python Package index — repository of python modules.

pip is used to download and install packages directly from PyPI. PyPI is hosted by Python Software Foundation. It is a specialized package manager that only deals with python packages.

apt-get is used to download and install packages from Ubuntu repositories which are hosted by Canonical.

Some of the differences between installing python packages from apt-get and pip are as follows:

  • Canonical only provides packages for selected python modules. Whereas, PyPI hosts a much broader range of python modules. So, there are a lot of python modules which you won't be able to install using apt-get.

  • Canonical only hosts a single version of any package (generally the latest or the one released in recent past). So, with apt-get we cannot decide the version of python-package that we want. pip helps us in this situation. We can install any version of the package that has previously been uploaded on PyPI. This is extremely helpful in case of conflict in dependencies.

  • apt-get installs python modules in system-wide location. We cannot just install modules in our project virtualenv. pip solves this problem for us. If we are using pip after activating the virtualenv, it is intelligent enough to only install the modules in our project virtualenv. As mentioned in previous point, if there is a version of a particular python package already installed in system-wide location, and one of our project requires an older version of the same python package, in such situations we can use virtualenv and pip to install that older version of python package without any conflicts.

  • As @Radu Rădeanu pointed out in this answer, there would generally be difference in names of packages as well. Canonical usually names Python 2 packages as python-<package_name> and Python 3 packages as python3-<package_name>. Whereas for pip we generally just need to use <package_name> for both Python 2 as well as Python3 packages.

Which one should you use:

Both apt-get and pip are mature package managers which automatically install any other package dependency while installing. You may use anyone as you like. However, if you need to install a particular version of python-package, or install the package in a virtualenv, or install a package which is only hosted on PyPI; only pip would help you solve that issue. Otherwise, if you don't mind installing the packages in system-wide location it doesn't really matter whether you use apt-get or pip.

2 of 4
22

As @AvinashRaj said in his comment, pip is used to install python packages only, but apt-get is used to install packages created in any programming language.

Your main problem is to find the right package name in both cases:

pip search pyudev

will give you the right name for the package you want to install using pip install, as

apt-cache search pyudev

will give you the right name for the package you want to install using apt-get install:

radu@Radu: ~ $ pip search pyudev
pyudev                    - A libudev binding
radu@Radu: ~ $ apt-cache search pyudev
python-pyudev - Python bindings for libudev
python3-pyudev - Python3 bindings for libudev

So, in conlusion, the correspondent of sudo apt-get install python-pyudev is sudo pip install pyudev, not sudo pip install python-pyudev.

Now depends on you what you want to choose when you want to install a python package: pip or apt-get. See for example this Q&A about difference in installing a package using pip and apt-get.

🌐
UBports
forums.ubports.com › topic › 9607 › how-can-i-install-pip-on-ubuntu-touch
How can i install pip on ubuntu touch | UBports Forum
September 25, 2025 - I want to use python-pip on ubuntu touch but i cant install: hablet@ubuntu-phablet:~$ sudo apt install python3-pip [sudo] password for phablet: Sorry, try ag...
🌐
Python Packaging
packaging.python.org › tutorials › installing-packages
Installing Packages — Python Packaging User Guide
It’s recommended to write ... Python installation that the python command refers to). ... Due to the way most Linux distributions are handling the Python 3 migration, Linux users using the system Python without creating a virtual environment first should replace the python command in this tutorial with python3 and the python -m pip command with ...
🌐
Reddit
reddit.com › r/ubuntu › help with installing python packages on ubuntu 24.04.
r/Ubuntu on Reddit: Help with installing Python packages on Ubuntu 24.04.
August 9, 2024 -

I'm trying to install a few python packages on my Ubuntu 24.04 machine running KDE Plasma, the Python interpreter can be invoked with python3 in a terminal window, however, using pip or pip3 to install a package, it returns this error:

$ pip3 install pytube
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

i've read here (https://docs.python-guide.org/dev/virtualenvs/#virtualenvironments-ref) that i can use pipenv to install packages only for my projects, rather than installing them system-wide, but it requires pip, which i can't access due to the error.

when creating a virtual environment in VS Code i can choose between 2 interpreters:

i chose the "Global" one and it doesn't let me create it. Returns an error:

VenvError: CREATE_VENV.VENV_FAILED_CREATION
2024-08-09 19:47:57.063 [error] Error while running venv creation script:  CREATE_VENV.VENV_FAILED_CREATION
2024-08-09 19:47:57.064 [error] CREATE_VENV.VENV_FAILED_CREATION
🌐
Educative
educative.io › answers › installing-pip3-in-ubuntu
Installing pip3 in Ubuntu
Use the apt-get -y install python3-pip command to install pip3, if Python 3 is already installed on your Ubuntu system.
🌐
PyPI
pypi.org › project › pip
pip · PyPI
The PyPA recommended tool for installing Python packages. ... pip is the package installer for Python.
      » pip install pip
    
Published   Feb 05, 2026
Version   26.0.1
🌐
Cherry Servers
cherryservers.com › home › blog › linux › how to install pip on ubuntu 24.04: step-by-step guide
How to Install PIP on Ubuntu 24.04: Step-by-Step Guide | Cherry Servers
November 7, 2025 - Learn how to install PIP on Ubuntu 24.04, manage Python packages, and set up virtual environments for isolated package installations in this step-by-step tutorial.
🌐
Liquid Web
liquidweb.com › home › how to install pip on ubuntu 16.04 lts
How to Install Pip on Ubuntu 16.04 LTS | Liquid Web
February 19, 2025 - In this quick tutorial, we teach you what is Pip and provide an easy two-step installation, paired with common Pip commands.
🌐
Liquid Web
liquidweb.com › home › help docs › server administration › linux server administration › how to install pip on ubuntu 14.04 lts
How to Install Pip on Ubuntu 14.04 LTS | Liquid Web
December 15, 2025 - In this quick tutorial, we teach you what is Pip and provide an easy two-step process to install this helpful Python manager.
🌐
Hostinger
hostinger.com › home › tutorials › how to install python pip on ubuntu
How to Install PIP on Ubuntu
July 9, 2025 - Learn how to install pip Python package manager on Ubuntu: 1. Connect to your server 2. Update system repository 3. Install pip + more
🌐
Linuxize
linuxize.com › home › python › how to install python pip on ubuntu
How to Install Python Pip on Ubuntu | Linuxize
January 19, 2026 - Learn how to install pip on Ubuntu using python3-pip, verify the version, and manage packages safely with virtual environments.
🌐
Pi My Life Up
pimylifeup.com › home › how to install pip on ubuntu
How to Install pip on Ubuntu - Pi My Life Up
March 19, 2024 - In this guide, we will show you how to install the Python package manager called pip on Ubuntu.