@@ -21,8 +21,8 @@ installed.
2121
2222.. tab :: Unix/macOS
2323
24- Debian and most other distributions include a `python-pip `_ package, if you
25- want to use the Linux distribution-provided versions of pip see
24+ Debian and most other distributions include a `python-pip `_ package; if you
25+ want to use the Linux distribution-provided versions of pip, see
2626 :doc: `/guides/installing-using-linux-tools `.
2727
2828 You can also install pip yourself to ensure you have the latest version. It's
@@ -32,30 +32,34 @@ installed.
3232
3333 python3 -m pip install --user --upgrade pip
3434
35- Afterwards, you should have the newest pip installed in your user site:
35+ python3 -m pip --version
3636
37- .. code-block :: bash
37+ Afterwards, you should have the latest version of pip installed in your
38+ user site:
3839
39- python3 -m pip --version
40- pip 9.0.1 from $HOME /.local/lib/python3.6/site-packages (python 3.6)
40+ .. code-block :: text
41+
42+ pip 21.1.3 from $HOME/.local/lib/python3.9/site-packages (python 3.9)
4143
4244 .. _python-pip : https://packages.debian.org/stable/python-pip
4345
4446.. tab :: Windows
4547
46- The Python installers for Windows include pip. You should be able to access
47- pip using :
48+ The Python installers for Windows include pip. You can make sure that pip is
49+ up-to-date by running :
4850
49- .. code-block :: bash
51+ .. code-block :: bat
52+
53+ py -m pip install --upgrade pip
5054
5155 py -m pip --version
52- pip 9.0.1 from c:\p ython36\l ib\s ite-packages (Python 3.6.1)
5356
54- You can make sure that pip is up-to-date by running :
57+ Afterwards, you should have the latest version of pip :
5558
56- .. code-block :: bash
59+ .. code-block :: text
60+
61+ pip 21.1.3 from c:\python39\lib\site-packages (Python 3.9.4)
5762
58- py -m pip install --upgrade pip
5963
6064
6165 Installing virtualenv
@@ -81,7 +85,7 @@ using pip.
8185
8286 .. tab :: Windows
8387
84- .. code-block :: bash
88+ .. code-block :: bat
8589
8690 py -m pip install --user virtualenv
8791
@@ -111,7 +115,7 @@ in the below commands.
111115
112116 .. tab :: Windows
113117
114- .. code-block :: bash
118+ .. code-block :: bat
115119
116120 py -m venv env
117121
@@ -140,27 +144,40 @@ virtual environment-specific
140144
141145 .. tab :: Windows
142146
143- .. code-block :: text
147+ .. code-block :: bat
144148
145149 .\env\Scripts\activate
146150
147151 You can confirm you're in the virtual environment by checking the location of your
148- Python interpreter, it should point to the `` env `` directory.
152+ Python interpreter:
149153
150154.. tab :: Unix/macOS
151155
152156 .. code-block :: bash
153157
154158 which python
155- .../env/bin/python
156159
157160 .. tab :: Windows
158161
159- .. code-block :: text
162+ .. code-block :: bat
160163
161164 where python
165+
166+ It should be in the ``env `` directory:
167+
168+ .. tab :: Unix/macOS
169+
170+ .. code-block :: bash
171+
172+ .../env/bin/python
173+
174+ .. tab :: Windows
175+
176+ .. code-block :: bat
177+
162178 ...\env\Scripts\python.exe
163179
180+
164181 As long as your virtual environment is activated pip will install packages into that
165182specific environment and you'll be able to import and use packages in your
166183Python application.
@@ -193,7 +210,7 @@ Now that you're in your virtual environment you can install packages. Let's inst
193210
194211 .. tab :: Windows
195212
196- .. code-block :: bash
213+ .. code-block :: bat
197214
198215 py -m pip install requests
199216
@@ -232,7 +249,7 @@ a specific version of ``requests``:
232249
233250 .. tab :: Windows
234251
235- .. code-block :: bash
252+ .. code-block :: bat
236253
237254 py -m pip install requests== 2.18.4
238255
@@ -246,7 +263,7 @@ To install the latest ``2.x`` release of requests:
246263
247264 .. tab :: Windows
248265
249- .. code-block :: bash
266+ .. code-block :: bat
250267
251268 py -m pip install requests> =2.0.0,< 3.0.0
252269
@@ -260,7 +277,7 @@ To install pre-release versions of packages, use the ``--pre`` flag:
260277
261278 .. tab :: Windows
262279
263- .. code-block :: bash
280+ .. code-block :: bat
264281
265282 py -m pip install --pre requests
266283
@@ -279,7 +296,7 @@ specifying the extra in brackets:
279296
280297 .. tab :: Windows
281298
282- .. code-block :: bash
299+ .. code-block :: bat
283300
284301 py -m pip install requests[security]
285302
@@ -301,7 +318,7 @@ pip can install a package directly from source, for example:
301318
302319 .. tab :: Windows
303320
304- .. code-block :: bash
321+ .. code-block :: bat
305322
306323 cd google-auth
307324 py -m pip install .
@@ -318,7 +335,7 @@ installed package without needing to re-install:
318335
319336 .. tab :: Windows
320337
321- .. code-block :: bash
338+ .. code-block :: bat
322339
323340 py -m pip install --editable .
324341
@@ -354,7 +371,7 @@ wheel, or tar file) you can install it directly with pip:
354371
355372 .. tab :: Windows
356373
357- .. code-block :: bash
374+ .. code-block :: bat
358375
359376 py -m pip install requests-2.18.4.tar.gz
360377
@@ -370,7 +387,7 @@ pip to look for packages there and not to use the
370387
371388 .. tab :: Windows
372389
373- .. code-block :: bash
390+ .. code-block :: bat
374391
375392 py -m pip install --no-index --find-links=/local/dir/ requests
376393
@@ -393,7 +410,7 @@ If you want to download packages from a different index than the
393410
394411 .. tab :: Windows
395412
396- .. code-block :: bash
413+ .. code-block :: bat
397414
398415 py -m pip install --index-url http://index.example.com/simple/ SomeProject
399416
@@ -409,7 +426,7 @@ and a separate index, you can use the ``--extra-index-url`` flag instead:
409426
410427 .. tab :: Windows
411428
412- .. code-block :: bash
429+ .. code-block :: bat
413430
414431 py -m pip install --extra-index-url http://index.example.com/simple/ SomeProject
415432
@@ -427,7 +444,7 @@ install the latest version of ``requests`` and all of its dependencies:
427444
428445 .. tab :: Windows
429446
430- .. code-block :: bash
447+ .. code-block :: bat
431448
432449 py -m pip install --upgrade requests
433450
@@ -453,7 +470,7 @@ And tell pip to install all of the packages in this file using the ``-r`` flag:
453470
454471 .. tab :: Windows
455472
456- .. code-block :: bash
473+ .. code-block :: bat
457474
458475 py -m pip install -r requirements.txt
459476
@@ -471,7 +488,7 @@ Pip can export a list of all installed packages and their versions using the
471488
472489 .. tab :: Windows
473490
474- .. code-block :: bash
491+ .. code-block :: bat
475492
476493 py -m pip freeze
477494
0 commit comments