Movatterモバイル変換


[0]ホーム

URL:


ContentsMenuExpandLight modeDark modeAuto light/dark, in light modeAuto light/dark, in dark modeSkip to content
Python Packaging User Guide
Python Packaging User Guide
Back to top

Installing pip/setuptools/wheel with Linux Package Managers

Page Status:

Incomplete

Last Reviewed:

2021-07-26

This section covers how to installpip,Setuptools, andwheel using Linux package managers.

If you’re using a Python that was downloaded frompython.org, then this section does not apply. See theRequirements for Installing Packages section instead.

Note that it’s common for the versions ofpip,Setuptools, andwheel supported by a specific Linux Distribution to be outdated by thetime it’s released to the public, and updates generally only occur for securityreasons, not for feature updates. For certain Distributions, there areadditional repositories that can be enabled to provide newer versions. Therepositories we know about are explained below.

Also note that it’s somewhat common for Distributions to apply patches for thesake of security and normalization to their own standards. In some cases, thiscan lead to bugs or unexpected behaviors that vary from the original unpatchedversions. When this is known, we will make note of it below.

Fedora

sudodnfinstallpython3-pippython3-wheel

To learn more about Python in Fedora, please visit theofficial Fedora docs,Python Classroom orFedora Loves Python.

CentOS/RHEL

CentOS and RHEL don’t offerpip orwheel in their core repositories,althoughSetuptools is installed by default.

To install pip and wheel for the system Python, there are two options:

  1. Enable theEPEL repository usingthese instructions.On EPEL 7, you can install pip and wheel like so:

    sudodnfinstallpython3-pippython3-wheel

    Since EPEL only offers extra, non-conflicting packages, EPEL does not offersetuptools, since it’s in the core repository.

  2. Enable thePyPA Copr Repo usingthese instructions[1]. You can installpip and wheel like so:

    sudodnfinstallpython3-pippython3-wheel

    To additionally upgrade setuptools, run:

    sudodnfupgradepython3-setuptools

To install pip, wheel, and setuptools, in a parallel, non-system environment(using yum) then there are two options:

  1. Use the “Software Collections” feature to enable a parallel collection thatincludes pip, setuptools, and wheel.

    Be aware that collections may not contain the most recent versions.

  2. Enable theIUS repository andinstall one of theparallel-installablePythons, along with pip, setuptools, and wheel, which are kept fairly up todate.

    For example, for Python 3.4 on CentOS7/RHEL7:

    sudoyuminstallpython34upython34u-wheel

openSUSE

sudozypperinstallpython3-pippython3-setuptoolspython3-wheel

Debian/Ubuntu and derivatives

Firstly, update and refresh repository lists by running this command:

sudoaptupdatesudoaptinstallpython3-venvpython3-pip

Warning

Recent Debian/Ubuntu versions have modified pip to use the“User Scheme” by default, whichis a significant behavior change that can be surprising to some users.

Arch Linux

sudopacman-Spython-pip

[1]

Currently, there is no “copr” yum plugin available for CentOS/RHEL, sothe only option is to manually place the repo files as described.

On this page

[8]ページ先頭

©2009-2026 Movatter.jp