Installing pip/setuptools/wheel with Linux Package Managers¶
- Page Status
- Last Reviewed
Note that it’s common for the versions of pip, setuptools, and wheel supported by a specific Linux Distribution to be outdated by the time it’s released to the public, and updates generally only occur for security reasons, not for feature updates. For certain Distributions, there are additional repositories that can be enabled to provide newer versions. The repositories we know about are explained below.
Also note that it’s somewhat common for Distributions to apply patches for the sake of security and normalization to their own standards. In some cases, this can lead to bugs or unexpected behaviors that vary from the original unpatched versions. When this is known, we will make note of it below.
sudo yum upgrade python-setuptools sudo yum install python-pip python-wheel
sudo yum install python3 python3-wheel
sudo dnf upgrade python-setuptools sudo dnf install python-pip python-wheel
sudo dnf install python3 python3-wheel
sudo yum|dnf upgrade python-setuptools sudo yum|dnf install python-pip python-wheel
To install pip and wheel for the system Python, there are two options:
sudo yum install python-pip
On EPEL 7 (but not EPEL 6), you can install wheel like so:
sudo yum install python-wheel
Since EPEL only offers extra, non-conflicting packages, EPEL does not offer setuptools, since it’s in the core repository.
sudo yum install python-pip python-wheel
To additionally upgrade setuptools, run:
sudo yum upgrade python-setuptools
To install pip, wheel, and setuptools, in a parallel, non-system environment (using yum) then there are two options:
Use the “Sofware Collections” feature to enable a parallel collection that includes pip, setuptools, and wheel.
For Redhat, see here: http://developers.redhat.com/products/softwarecollections/overview/
For CentOS, see here: https://www.softwarecollections.org/en/
Be aware that collections may not contain the most recent versions.
For example, for Python 3.4 on CentOS7/RHEL7:
sudo yum install python34u python34u-wheel
sudo zypper install python-pip python-setuptools python-wheel
sudo zypper install python3-pip python3-setuptools python3-wheel
sudo apt install python-pip
sudo apt install python3-venv python3-pip
Recent Debian/Ubuntu versions have modified pip to use the “User Scheme” by default, which is a significant behavior change that can be surprising to some users.