Skip to content

Commit c3b6c46

Browse files
dukecat0bhrutledge
andauthored
Add Windows tab for some commands (#942)
* Add Windows Tab * Update source/guides/installing-stand-alone-command-line-tools.rst Co-authored-by: Brian Rutledge <brian@bhrutledge.com> * normalize the input and change `python` to `python3` * Revoke changing `python` to `python3` * Revoke changing `python` to `python3` * using `console` lexer to highlight terminal session * Add a space between two command * Revoke changes * Revoke changes * Revoke changes * Revert remaining unrelated change Co-authored-by: Brian Rutledge <brian@bhrutledge.com> Co-authored-by: Brian Rutledge <bhrutledge@gmail.com>
1 parent b8cceef commit c3b6c46

2 files changed

Lines changed: 37 additions & 8 deletions

File tree

source/guides/installing-stand-alone-command-line-tools.rst

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,21 @@ packages, and allows you to safely run the program from anywhere.
2222

2323
``pipx`` is installed with ``pip``:
2424

25-
::
25+
.. tab:: Unix/macOS
26+
27+
.. code-block:: bash
28+
29+
python3 -m pip install --user pipx
30+
31+
python3 -m pipx ensurepath # ensures the path of the CLI application directory is on your $PATH
32+
33+
.. tab:: Windows
2634

27-
$ python3 -m pip install --user pipx
28-
$ python3 -m pipx ensurepath # ensures the path of the CLI application directory is on your $PATH
35+
.. code-block:: bat
36+
37+
py -m pip install --user pipx
38+
39+
py -m pipx ensurepath
2940
3041
.. Note:: You may need to restart your terminal for the path updates to take effect.
3142

@@ -85,11 +96,20 @@ To upgrade or uninstall the package
8596

8697
``pipx`` can be upgraded or uninstalled with pip
8798

88-
::
99+
.. tab:: Unix/macOS
100+
101+
.. code-block:: bash
102+
103+
python3 -m pip install -U pipx
104+
python3 -m pip uninstall pipx
105+
106+
.. tab:: Windows
89107

90-
$ python3 -m pip install -U pipx
91-
$ python3 -m pip uninstall pipx
108+
.. code-block:: bat
92109
110+
py -m pip install -U pipx
111+
py -m pip uninstall pipx
112+
93113
``pipx`` also allows you to install and run the latest version of a cli tool
94114
in a temporary, ephemeral environment.
95115

source/tutorials/installing-packages.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,19 @@ Ensure pip, setuptools, and wheel are up to date
160160

161161
While ``pip`` alone is sufficient to install from pre-built binary archives,
162162
up to date copies of the ``setuptools`` and ``wheel`` projects are useful
163-
to ensure you can also install from source archives::
163+
to ensure you can also install from source archives:
164164

165-
python3 -m pip install --upgrade pip setuptools wheel
165+
.. tab:: Unix/macOS
166+
167+
.. code-block:: bash
168+
169+
python3 -m pip install --upgrade pip setuptools wheel
170+
171+
.. tab:: Windows
172+
173+
.. code-block:: bat
166174
175+
py -m pip install --upgrade pip setuptools wheel
167176
168177
Optionally, create a virtual environment
169178
----------------------------------------

0 commit comments

Comments
 (0)