It seems python3-pip is not installed correctly on my system so I did

sudo apt install --reinstall python3-pip

Now I can install programs with pip3.

Answer from Jedi on askubuntu.com
🌐
Reddit
reddit.com › r/learnpython › can't "sudo apt install python3-pip" on ubuntu. 404 not found.
r/learnpython on Reddit: Can't "sudo apt install python3-pip" on Ubuntu. 404 Not Found.
March 15, 2022 -

I recently moved from Windows over to Ubuntu - running Ubuntu 20.04. Python version 3.8.10 - which I had to manually install using option 1 of the following doc: https://phoenixnap.com/kb/how-to-install-python-3-ubuntu

When I enter sudo apt install python3-pip in the terminal to install pip I get the following error. Notice the 404 errors and Failed to fetch errors. What am I doing wrong?

Thanks for the help and time.

Ign:1 http://mirror.lnx-solutions.com/ubuntu focal-updates/universe amd64 python-pip-whl all 20.0.2-5ubuntu1.6
Ign:2 http://mirror.lnx-solutions.com/ubuntu focal-updates/main amd64 python3-distutils all 3.8.10-0ubuntu1~20.04
Ign:3 http://mirror.lnx-solutions.com/ubuntu focal-updates/universe amd64 python3-pip all 20.0.2-5ubuntu1.6
Err:1 http://mirror.lnx-solutions.com/ubuntu focal-updates/universe amd64 python-pip-whl all 20.0.2-5ubuntu1.6
  404  Not Found [IP: 41.76.131.62 80]
Ign:2 http://mirror.lnx-solutions.com/ubuntu focal-updates/main amd64 python3-distutils all 3.8.10-0ubuntu1~20.04
Err:3 http://mirror.lnx-solutions.com/ubuntu focal-updates/universe amd64 python3-pip all 20.0.2-5ubuntu1.6
  404  Not Found [IP: 41.76.131.62 80]
Ign:2 http://mirror.lnx-solutions.com/ubuntu focal-updates/main amd64 python3-distutils all 3.8.10-0ubuntu1~20.04
Err:2 http://mirror.lnx-solutions.com/ubuntu focal-updates/main amd64 python3-distutils all 3.8.10-0ubuntu1~20.04
  404  Not Found [IP: 41.76.131.62 80]
E: Failed to fetch http://mirror.lnx-solutions.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_20.0.2-5ubuntu1.6_all.deb  404  Not Found [IP: 41.76.131.62 80]
E: Failed to fetch http://mirror.lnx-solutions.com/ubuntu/pool/main/p/python3-stdlib-extensions/python3-distutils_3.8.10-0ubuntu1~20.04_all.deb  404  Not Found [IP: 41.76.131.62 80]
E: Failed to fetch http://mirror.lnx-solutions.com/ubuntu/pool/universe/p/python-pip/python3-pip_20.0.2-5ubuntu1.6_all.deb  404  Not Found [IP: 41.76.131.62 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Discussions

How to install pip in Python 3 on Ubuntu 18.04?
Hello, Now I want to deploy odoo12 on ubuntu18.04 and i type "sudo apt-get install python3-pip" in terminal. But show error message like that "Enable to locate package python3-pip".How should I do?.Please kindly guide to me. Thanks More on odoo.com
🌐 odoo.com
8
0
March 25, 2020
python3 - Difference between installing a package with 'apt' and 'pip' - Unix & Linux Stack Exchange
Of course, if your Python installation ... /opt/foobar/python3.10, then using pip is perfectly fine. This is what a Python venv does, so using pip in a venv is safe. ... This answer is both factually incorrect and unduly alarmist. Using pip to install Python modules on your own account is fine. You don't have to compartmentalize everything. And on Debian and derivatives (so most distributions using apt), pip install ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
February 8, 2023
How to install pip for python3.13t
If I try using the package manager ($ sudo apt-get install python3-pip), the OS will install pip for v3.12, which is not what I want. When I try a semi-manual installation $ python -m ensurepip --upgrade /usr/bin/python3.13t: No module named ensurepip It doesn’t seem to have ensurepip. More on discuss.python.org
🌐 discuss.python.org
11
0
April 20, 2025
python - How to install python3 version of package via pip on Ubuntu? - Stack Overflow
Ubuntu 12.10+ and Fedora 13+ have ... or pip3 for newer versions) without needing this jumping through hoops. I came across this and fixed this without needing the likes of wget or virtualenvs (assuming Ubuntu 12.04): Install package python3-setuptools: run sudo aptitude install ... More on stackoverflow.com
🌐 stackoverflow.com
People also ask

How do we install pip3 in Python?
We can install `pip3` in the following way: 1. Download `get-pip.py`. 2. Run `python get-pip.py` in the terminal.
🌐
educative.io
educative.io › answers › installing-pip3-in-ubuntu
Installing pip3 in Ubuntu
How can we install specific version of pip3 in Ubuntu?
We can install a specific version of `pip3` in Ubuntu using the following code: ``` sudo apt-get install python3-pip=version_number ```
🌐
educative.io
educative.io › answers › installing-pip3-in-ubuntu
Installing pip3 in Ubuntu
How do we install sqlite3 with pip3 in Ubuntu?
We can install `sqlite3` with `pip3` with this command: `pip install sqlite3`.
🌐
educative.io
educative.io › answers › installing-pip3-in-ubuntu
Installing pip3 in Ubuntu
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install pip on ubuntu
How to Install Pip on Ubuntu
December 11, 2025 - 2. Install Pip for Python 3 and all the dependencies for building Python modules by running the following command: sudo apt install python3-pip · 3. To verify the installation, use this command: pip3 --version · 4. To upgrade pip3 to the latest ...
🌐
GitHub
gist.github.com › hadisfr › 5c055c2d850cabeecaf51d1b599bd363
a short guide to install python3 and pip3 on Ubuntu Server · GitHub
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install python3.7 python3.7-dev · Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python3/d...
Find elsewhere
Top answer
1 of 2
25

I will appreciate if someone could explain the differences (if any) between:

Highest level: you never should use pip install to install to system (--system, or on Linux distros where --user isn't the default, omitting --user) when things might conflict with your system whereas apt install is pretty safe.

Explanation:

apt is the package installation tool of your Linux distro. A Linux distribution these days is mostly the effort to offer a way to install packages in a way that works with each other without breaking – for example, if you're trying to install a library that libreoffice uses, but in a version incompatible with your libreoffice, your linux distro tool will tell you that sadly, to fulfill your command, it will have to uninstall libreoffice, because it wouldn't work with that version you're requesting.

The fact that you very rarely see that happen is an indication of how well modern Linux distros are doing here: typically, most of software that you can install using apt works well together.

pip, on the other hand, has no notion of what other software you have on your machine, which you might need. You tell pip to install something in a version that breaks your ability to even boot your system – it will go ahead and do that.

pip is python-specific. It assumes that all there is on that machine that has something to do with Python is kind of "fair game" and can be dealt with arbitrarily. Frankly, that is almost never the case – for example, on Fedora (another Linux distro that you're not using), you can easily break the installation tool dnf (Fedora's apt, if you will) with pip.

So, why does pip still exist? Well, there are situation where it's OK for pip to assume every bit of python it sees is under its control: Python brings a mechanism called virtual environments. In these, no python modules are per se installed, and they don't conflict with other software on your machine – simply because other software isn't aware of the environment.

Using that is quite straightforward. You can set up such an environment using

python3 -m venv ~/bertsexperiment

That sets up a folder ~/bertsexperiment for Python stuff to be installed into. You can then, from anywhere you like, "activate" that environment (what that really does is just change a few environment variables) – but that only affects the current process and things started from it. Try it:

source ~/bertsexperiment/bin/activate

will set up this shell in a way that all future python tooling will work with that folder as "prefix".

For example, if you wanted to have an updated setuptools in that shell, you could, after sourceing the activaton script as shown above, run pip3 install --upgrade setuptools, and they would be installed into the virtualenv.

In short:

  • if in doubt, use apt, because it's your distro's job to keep your software stack working together
  • Never use pip unless you intend to install something into a folder only used for your current project and not by anything else on your system.
    Hence, the only realistic time you would want to use it is when you're using a Python virtualenv.
2 of 2
0

It really depends on your end goal.

  • Something in another Debian package depends on this package? Definitely use apt.
  • Or conversely, you want to create a package or a set of packages for Debian or a Debian-based distro like Ubuntu, Mint, etc - again, definitely stay in apt land.
  • You want to install something which requires a newer version than you can find on Debian - you can hunt for backported .deb packages from https://backports.debian.org/ or random PPAs, but perhaps at this point it's easier and more straightforward to move to pip. (Though sometimes the packaging work adds significant value but requires nontrivial effort; then, a PPA can really save your day.)
  • You want to develop a Python script of your own and ideally have the latest and greatest features of the Python packages you depend on - usually then use pip
    • ... or even install things directly from the upstream Github project or whatever, for the really bleeding edge. But probably don't stretch too far. If you don't have a professional software development team at your disposal, stick to reasonably stable versions for all but the most valuable, most crucial one or two packages you depend on.

To recap, what makes sense ultimately depends on where in the maturity cycle you are. The benefit of official Debian packages is that they tend to be very stable and time-tested, but the drawback is then that you will not be running the latest versions with the spiffiest new features.

Also keep in mind that some Debian packages go to extra lengths to integrate the packaged software with the broader Debian ecosystem. For a random Python script this is typically unimportant, but if it's a Debian system administration tool or some sort of infrastructure project, obviously you want all the Debian parts that upstream might not have, or might not enable and configure correctly by default.

🌐
Python.org
discuss.python.org › python help
How to install pip for python3.13t - Python Help - Discussions on Python.org
April 20, 2025 - The interpreter seems to be working OK but I simply cannot install pip. If I try using the package manager ($ sudo apt-get install python3-pip), the OS will install pip for v3.12, which is not what I want.
🌐
Educative
educative.io › answers › installing-pip3-in-ubuntu
Installing pip3 in Ubuntu
Installing pip3 is an essential step for Python development on Ubuntu, as it is the official package installer for Python 3. Use the apt-get -y install python3-pip command to install pip3, if Python 3 is already installed on your Ubuntu system.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › troubleshooting
Cannot apt install python3-pip - Raspberry Pi Forums
I am not so sure wether standard desktop comes with it installed but I know for certain using the Lite version does not · RonR · Posts: 4006 · Joined: Tue Apr 12, 2016 10:29 pm · Sun Oct 11, 2020 12:36 am · Tekaoh wrote: Sat Oct 10, 2020 12:22 am I am trying to get python3-pip based on this documentation: https://www.raspberrypi.org/documentati ... /python.md Did you try running the following first?: Code: Select all · sudo apt update sudo apt full-upgrade ·
🌐
Linuxize
linuxize.com › home › python › how to install python pip on ubuntu
How to Install Python Pip on Ubuntu | Linuxize
1 week ago - Install pip on Ubuntu with a single apt command. Covers python3-pip setup, virtual environments, and common pip commands for managing Python packages.
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-pip-in-ubuntu
How to install PIP in Ubuntu? - GeeksforGeeks
July 23, 2025 - Command: sudo apt install python3-pip · Step 4: Now, it is time to verify the installation. For that purpose, the following command will be executed on Linux Terminal. Command: pip3 --version · Now, You successfully installed PIP in Ubuntu ...
🌐
Astral
docs.astral.sh › uv › guides › install-python
Installing and managing Python | uv
July 17, 2025 - A guide to using uv to install Python, including requesting specific versions, automatic installation, viewing installed versions, and more.
🌐
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
February 20, 2026 - In fact, you run into an error when you try to install a Python package as shown here below. pip3 install numpy · To install the latest version of pip, run the following command: sudo apt install python3-pip -y ·
🌐
Medium
sakshamlakhera.medium.com › installing-python-3-on-ubuntu-1602fc3bbf48
Installing python 3 on Ubuntu. Installing pip for Python 3 | by Saksham Lakhera | Medium
September 21, 2020 - Install pip by running the following command. ... $ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
🌐
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 - With Python3 installed, install PIP as follows. sudo apt install python3-pip -y · The command installs PIP alongside multiple packages, including GNU Binary Utilities and the GCC compiler, as well as other libraries and dependencies.
🌐
Readthedocs
coverage.readthedocs.io › en › 7.12.0 › install.html
Installation — Coverage.py 7.12.0 documentation
The exact commands depend on which package manager you use, which Python version you are using, and the names of the packages for your distribution. For example: $ sudo apt-get install python-dev gcc $ sudo yum install python-devel gcc $ sudo apt-get install python3-dev gcc $ ...