44Installing pip/setuptools/wheel with Linux Package Managers
55===========================================================
66
7- :Page Status: Incomplete
8- :Last Reviewed: 2015-09-17
9-
7+ .. contents :: Contents
8+ :local:
109
1110This section covers how to install :ref: `pip `, :ref: `setuptools `, and
1211:ref: `wheel ` using Linux package managers.
@@ -31,32 +30,31 @@ versions. When this is known, we will make note of it below.
3130Fedora
3231~~~~~~
3332
34- * Fedora 21 :
33+ * Fedora 33 & 34 :
3534
36- * Python 2: :
35+ * Python 3 :
3736
38- sudo yum upgrade python-setuptools
39- sudo yum install python-pip python-wheel
37+ .. code-block :: bash
4038
41- * Python 3: `` sudo yum install python3 python3-wheel ``
39+ sudo dnf install python3 python3-wheel
4240
43- * Fedora 22 :
41+ * Python 2 :
4442
45- * Python 2::
43+ .. code-block :: bash
4644
4745 sudo dnf upgrade python-setuptools
4846 sudo dnf install python-pip python-wheel
4947
50- * Python 3: ``sudo dnf install python3 python3-wheel ``
51-
5248
5349 To get newer versions of pip, setuptools, and wheel for Python 2, you can enable
5450the `PyPA Copr Repo <https://copr.fedoraproject.org/coprs/pypa/pypa/ >`_ using
5551the `Copr Repo instructions
56- <https://fedorahosted.org/copr/wiki/HowToEnableRepo> `__, and then run::
52+ <https://fedorahosted.org/copr/wiki/HowToEnableRepo> `__, and then run:
5753
58- sudo yum|dnf upgrade python-setuptools
59- sudo yum|dnf install python-pip python-wheel
54+ .. code-block :: bash
55+
56+ sudo dnf upgrade python-setuptools
57+ sudo dnf install python-pip python-wheel
6058
6159
6260 CentOS/RHEL
@@ -70,26 +68,42 @@ To install pip and wheel for the system Python, there are two options:
70681. Enable the `EPEL repository <https://fedoraproject.org/wiki/EPEL >`_ using
7169 `these instructions
7270 <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::
71+ EPEL 6 and EPEL7, you can install pip like so:
72+
73+ * Python3:
74+
75+ .. code-block :: bash
76+
77+ sudo yum install python3-pip
78+
79+ * Python2:
80+
81+ .. code-block :: bash
7482
75- sudo yum install python-pip
83+ sudo yum install python-pip
7684
77- On EPEL 7 (but not EPEL 6), you can install wheel like so: :
85+ On EPEL 7 (but not EPEL 6), you can install wheel like so:
7886
79- sudo yum install python-wheel
87+ .. code-block :: bash
8088
81- Since EPEL only offers extra, non-conflicting packages, EPEL does not offer
82- setuptools, since it's in the core repository.
89+ sudo yum install python-wheel
90+
91+ Since EPEL only offers extra, non-conflicting packages, EPEL does not offer
92+ setuptools, since it's in the core repository.
8393
8494
85952. Enable the `PyPA Copr Repo
8696 <https://copr.fedoraproject.org/coprs/pypa/pypa/> `_ using `these instructions
8797 <https://fedorahosted.org/copr/wiki/HowToEnableRepo> `__ [1 ]_. You can install
88- pip and wheel like so::
98+ pip and wheel like so:
99+
100+ .. code-block :: bash
89101
90102 sudo yum install python-pip python-wheel
91103
92- To additionally upgrade setuptools, run::
104+ To additionally upgrade setuptools, run:
105+
106+ .. code-block :: bash
93107
94108 sudo yum upgrade python-setuptools
95109
@@ -113,37 +127,49 @@ To install pip, wheel, and setuptools, in a parallel, non-system environment
113127 Pythons, along with pip, setuptools, and wheel, which are kept fairly up to
114128 date.
115129
116- For example, for Python 3.4 on CentOS7/RHEL7::
130+ For example, for Python 3.4 on CentOS7/RHEL7:
131+
132+ .. code-block :: bash
117133
118134 sudo yum install python34u python34u-wheel
119135
120136
121137 openSUSE
122138~~~~~~~~
123139
124- * Python 2::
125-
126- sudo zypper install python-pip python-setuptools python-wheel
127-
140+ * Python 3:
128141
129- * Python 3::
142+ .. code-block :: bash
130143
131144 sudo zypper install python3-pip python3-setuptools python3-wheel
132145
146+ * Python 2:
147+
148+ .. code-block :: bash
149+
150+ sudo zypper install python-pip python-setuptools python-wheel
133151
134152 Debian/Ubuntu
135153~~~~~~~~~~~~~
136154
155+ Firstly, update and refresh repository lists by running this command:
137156
138- * Python 2::
157+ .. code-block :: bash
139158
140- sudo apt install python-pip
159+ sudo apt update
141160
161+ * Python 3:
142162
143- * Python 3::
163+ .. code-block :: bash
144164
145165 sudo apt install python3-venv python3-pip
146166
167+ * Python 2:
168+
169+ .. code-block :: bash
170+
171+ sudo apt install python-pip
172+
147173
148174 .. warning ::
149175
@@ -155,14 +181,18 @@ Debian/Ubuntu
155181Arch Linux
156182~~~~~~~~~~
157183
158- * Python 2::
159-
160- sudo pacman -S python2-pip
184+ * Python 3:
161185
162- * Python 3::
186+ .. code-block :: bash
163187
164188 sudo pacman -S python-pip
165189
190+ * Python 2:
191+
192+ .. code-block :: bash
193+
194+ sudo pacman -S python2-pip
195+
166196----
167197
168198.. [1 ] Currently, there is no "copr" yum plugin available for CentOS/RHEL, so
0 commit comments