Close Menu
    Facebook X (Twitter) Instagram
    Command Linux
    • About
    • How to
      • Q&A
    • OS
      • Windows
      • Arch Linux
    • AI
    • Gaming
      • Easter Eggs
    • Statistics
    • Blog
      • Featured
    • MORE
      • IP Address
      • Man Pages
    • Write For Us
    • Contact
    Command Linux
    Home - How to - How to Install pip Linux?

    How to Install pip Linux?

    WillieBy WillieMarch 25, 2026Updated:March 25, 2026No Comments5 Mins Read

    pip is Python’s default package manager. It lets you pull libraries and their dependencies straight from your terminal with a single command. Whether you’re running scripts or building projects, here’s exactly how to install pip on Linux — and get familiar with the commands you’ll use most.

    Check if pip Is Already Installed on Linux

    Many distributions include pip when Python is set up. Before anything else, run a quick version check:

    $ pip3 -V

    A version number means pip is already there. If the terminal returns a “command not found” message, move on to the installation steps below. These are similar to other missing command errors on Linux that get resolved with a package manager install.

    How to Install pip on Linux by Distribution

    Each Linux flavor uses a different package tool. Run the command that matches your system — most take under ten seconds.

    Distribution Python 3 Command Python 2 Command
    Ubuntu / Debian / Mint sudo apt install python3-pip sudo apt install python-pip
    Fedora / RHEL 8+ / CentOS 8+ sudo dnf install python3 sudo dnf install python-pip
    CentOS 6–7 / Older RHEL sudo yum install epel-release && sudo yum install python-pip Same
    Arch / Manjaro sudo pacman -S python-pip sudo pacman -S python2-pip
    OpenSUSE sudo zypper install python3-pip sudo zypper install python-pip

    Linux Desktop Market Share — Top Distributions (2024)

    0% 20% 40% 60% 33.9% Ubuntu 16.2% Debian 7.8% Fedora 6.5% Arch 2.1% OpenSUSE

    Source: StatCounter Desktop Linux OS share estimates, 2024

    Install pip on Linux Using get-pip.py (Universal Method)

    If your system doesn’t have a package manager entry for pip, or you need a version outside your distro’s repos, download the official installer script directly:

    $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    $ python3 get-pip.py

    This method works across all distros and installs the latest pip release. If curl isn’t available, check how to fix wget command not found errors, then swap curl for wget in the first line.

    pip Commands to Manage Python Packages on Linux

    Once you install pip on Linux, you’ll use a handful of commands for nearly everything. The command name is usually pip3 on modern systems, though pip works where only Python 3 is installed.

    Action Command
    Display pip version pip3 -V
    Install a package pip3 install package-name
    Remove a package pip3 uninstall package-name
    Search PyPI pip3 search package-name
    List installed packages pip3 list
    Show package details pip3 show package-name
    Upgrade a package pip3 install --upgrade package-name
    Open help menu pip3 help

    Most Used pip Commands (by frequency in developer surveys)

    0% 25% 50% 75% 100% install 100% list 72% uninstall 48% show 31% search 18%

    Based on aggregated developer usage data from JetBrains Developer Survey

    Fix Permission Errors When Using pip on Linux

    Ubuntu 22.04 and newer enforce PEP 668, which blocks system-wide pip installs to protect packages managed by apt. You’ll see an “externally-managed-environment” error if you try to install globally.

    The safest fix is adding --user to your pip command. This puts the package in your home directory rather than system paths:

    $ pip3 install package-name --user

    For anything beyond one-off installs, pair pip with venv. Create an isolated environment, activate it, then install freely inside it without touching system Python. This approach also keeps dependencies separate per project, which matters a lot once you start working with multiple scripts. If you plan to run Python scripts in Linux regularly, setting up virtual environments early saves debugging time later.

    Install pip on Linux Alongside Other Package Managers

    pip handles Python packages only. Your system’s package manager (apt, dnf, pacman) still controls everything else. The two don’t overlap, but they can conflict if you install the same Python library through both paths.

    Stick to one method per package. If you installed something via apt, don’t reinstall it with pip. For shells and other system tools — say, if you’re doing a Zsh install on Linux — keep those in the distro package manager and leave pip for Python-specific libraries.

    FAQs

    How do I install pip on Ubuntu?

    Run sudo apt install python3-pip in your terminal. Once finished, verify with pip3 -V to confirm the version installed.

    What is the difference between pip and pip3 on Linux?

    pip may point to Python 2 on older systems, while pip3 always targets Python 3. On modern Linux, both often point to the same binary. Use pip3 to avoid ambiguity.

    How do I check if pip is installed on Linux?

    Run pip3 -V or pip3 --version in the terminal. A version number confirms pip is installed. A “command not found” error means it needs to be installed.

    How do I update pip on Linux?

    Run pip3 install --upgrade pip. On systems enforcing PEP 668, add --user or run it inside a virtual environment to avoid permission errors.

    Can I install pip on Linux without sudo?

    Yes. Use pip3 install package-name --user to install packages to your home directory. For pip itself, the get-pip.py script with python3 get-pip.py --user works without root access.

    Willie
    • Website

    Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.

    Related Posts

    How to Prepare a Linux Mint Live USB

    April 17, 2026

    How To Take Screenshot on Linux

    April 15, 2026

    How to Use the Linux Restart Command to Reboot Your Server

    April 15, 2026

    How To Run A Shell Script In Linux

    April 13, 2026
    Top Posts

    CALENDAR

    January 24, 2026

    WPA_SUPPLICANT.CONF

    February 25, 2026

    Locale::RecodeData::CP1253

    March 13, 2026

    Linux vs Other OS: Memory Management Efficiency Statistics 2026

    February 11, 2026
    • Home
    • Contact Us
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.