@@ -5,8 +5,10 @@ Installing pip/setuptools/wheel with Linux Package Managers
55===========================================================
66
77:Page Status: Incomplete
8- :Last Reviewed: 2015-09-17
8+ :Last Reviewed: 2021-07-26
99
10+ .. contents :: Contents
11+ :local:
1012
1113This section covers how to install :ref: `pip `, :ref: `setuptools `, and
1214:ref: `wheel ` using Linux package managers.
@@ -31,33 +33,16 @@ versions. When this is known, we will make note of it below.
3133Fedora
3234~~~~~~
3335
34- * Fedora 21:
36+ .. code-block :: bash
3537
36- * Python 2::
38+ sudo dnf install python3-pip python3-wheel
3739
38- sudo yum upgrade python-setuptools
39- sudo yum install python-pip python-wheel
40-
41- * Python 3: ``sudo yum install python3 python3-wheel ``
42-
43- * Fedora 22:
44-
45- * Python 2::
46-
47- sudo dnf upgrade python-setuptools
48- sudo dnf install python-pip python-wheel
49-
50- * Python 3: ``sudo dnf install python3 python3-wheel ``
51-
52-
53- To get newer versions of pip, setuptools, and wheel for Python 2, you can enable
54- the `PyPA Copr Repo <https://copr.fedoraproject.org/coprs/pypa/pypa/ >`_ using
55- the `Copr Repo instructions
56- <https://fedorahosted.org/copr/wiki/HowToEnableRepo> `__, and then run::
57-
58- sudo yum|dnf upgrade python-setuptools
59- sudo yum|dnf install python-pip python-wheel
40+ To learn more about Python in Fedora, please visit the `official Fedora docs `_,
41+ `Python Classroom `_ or `Fedora Loves Python `_.
6042
43+ .. _official Fedora docs : https://developer.fedoraproject.org/tech/languages/python/python-installation.html
44+ .. _Python Classroom : https://labs.fedoraproject.org/en/python-classroom/
45+ .. _Fedora Loves Python : https://fedoralovespython.org
6146
6247CentOS/RHEL
6348~~~~~~~~~~~
@@ -69,14 +54,12 @@ To install pip and wheel for the system Python, there are two options:
6954
70551. Enable the `EPEL repository <https://fedoraproject.org/wiki/EPEL >`_ using
7156 `these instructions
72- <https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F> `__. On
73- EPEL 6 and EPEL7, you can install pip like so::
74-
75- sudo yum install python-pip
57+ <https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F> `__.
58+ On EPEL 7, you can install pip and wheel like so:
7659
77- On EPEL 7 (but not EPEL 6), you can install wheel like so::
60+ .. code-block :: bash
7861
79- sudo yum install python -wheel
62+ sudo dnf install python3-pip python3 -wheel
8063
8164 Since EPEL only offers extra, non-conflicting packages, EPEL does not offer
8265 setuptools, since it's in the core repository.
@@ -85,13 +68,17 @@ To install pip and wheel for the system Python, there are two options:
85682. Enable the `PyPA Copr Repo
8669 <https://copr.fedoraproject.org/coprs/pypa/pypa/> `_ using `these instructions
8770 <https://fedorahosted.org/copr/wiki/HowToEnableRepo> `__ [1 ]_. You can install
88- pip and wheel like so::
71+ pip and wheel like so:
72+
73+ .. code-block :: bash
74+
75+ sudo dnf install python3-pip python3-wheel
8976
90- sudo yum install python-pip python-wheel
77+ To additionally upgrade setuptools, run:
9178
92- To additionally upgrade setuptools, run::
79+ .. code-block :: bash
9380
94- sudo yum upgrade python -setuptools
81+ sudo dnf upgrade python3 -setuptools
9582
9683
9784 To install pip, wheel, and setuptools, in a parallel, non-system environment
@@ -113,37 +100,29 @@ To install pip, wheel, and setuptools, in a parallel, non-system environment
113100 Pythons, along with pip, setuptools, and wheel, which are kept fairly up to
114101 date.
115102
116- For example, for Python 3.4 on CentOS7/RHEL7::
103+ For example, for Python 3.4 on CentOS7/RHEL7:
104+
105+ .. code-block :: bash
117106
118107 sudo yum install python34u python34u-wheel
119108
120109
121110 openSUSE
122111~~~~~~~~
123112
124- * Python 2::
125-
126- sudo zypper install python-pip python-setuptools python-wheel
127-
128-
129- * Python 3::
113+ .. code-block :: bash
130114
131115 sudo zypper install python3-pip python3-setuptools python3-wheel
132116
133-
134117 Debian/Ubuntu
135118~~~~~~~~~~~~~
136119
120+ Firstly, update and refresh repository lists by running this command:
137121
138- * Python 2::
139-
140- sudo apt install python-pip
141-
142-
143- * Python 3::
144-
145- sudo apt install python3-venv python3-pip
122+ .. code-block :: bash
146123
124+ sudo apt update
125+ sudo apt install python3-venv python3-pip
147126
148127 .. warning ::
149128
@@ -155,11 +134,7 @@ Debian/Ubuntu
155134Arch Linux
156135~~~~~~~~~~
157136
158- * Python 2::
159-
160- sudo pacman -S python2-pip
161-
162- * Python 3::
137+ .. code-block :: bash
163138
164139 sudo pacman -S python-pip
165140
0 commit comments