11Installing stand alone command line tools
22=========================================
33
4- Many packages have command line entry points . Examples of this type of application are
4+ Many packages provide command line applications . Examples of such packages are
55`mypy <https://github.com/python/mypy >`_,
66`flake8 <https://github.com/PyCQA/flake8 >`_,
7- :ref: ` pipenv `, and
8- ` black < https://github.com/ambv/black >`_ .
7+ ` black < https://github.com/psf/black >`_, and
8+ :ref: ` pipenv ` .
99
10- Usually you want to be able to access these from anywhere,
11- but installing packages and their dependencies to the same global environment
12- can cause version conflicts and break dependencies the operating system has
13- on Python packages.
10+ Usually you want to be able to access these applications from anywhere on your
11+ system, but installing packages and their dependencies to the same global
12+ environment can cause version conflicts and break dependencies the operating
13+ system has on Python packages.
1414
15- :ref: `pipx ` solves this by creating a virtual
16- environment for each package, while also ensuring that package's applications
17- are accessible through a directory that is on your ``$PATH ``. This allows each
18- package to be upgraded or uninstalled without causing conflicts with other
19- packages, and allows you to safely run the program from anywhere.
15+ :ref: `pipx ` solves this by creating a virtual environment for each package,
16+ while also ensuring that its applications are accessible through a directory
17+ that is on your ``$PATH ``. This allows each package to be upgraded or
18+ uninstalled without causing conflicts with other packages, and allows you to
19+ safely run the applications from anywhere.
2020
2121.. note :: pipx only works with Python 3.6+.
2222
23- `` pipx `` is installed with `` pip `` :
23+ pipx is installed with pip:
2424
2525.. tab :: Unix/macOS
2626
2727 .. code-block :: bash
2828
2929 python3 -m pip install --user pipx
30-
31- python3 -m pipx ensurepath # ensures the path of the CLI application directory is on your $PATH
30+ python3 -m pipx ensurepath
3231
3332 .. tab :: Windows
3433
3534 .. code-block :: bat
3635
3736 py -m pip install --user pipx
38-
3937 py -m pipx ensurepath
4038
41- .. Note :: You may need to restart your terminal for the path updates to take effect.
39+ .. note ::
40+
41+ ``ensurepath `` ensures that the application directory is on your ``$PATH ``.
42+ You may need to restart your terminal for this update to take effect.
4243
43- Now you can install packages with ``pipx install `` and access the package's entry point(s) from anywhere.
44+ Now you can install packages with ``pipx install `` and run the package's
45+ applications(s) from anywhere.
4446
4547.. code-block :: console
4648
4749 $ pipx install PACKAGE
48- $ ENTRYPOINT_OF_PACKAGE [ARGS]
50+ $ PACKAGE_APPLICATION [ARGS]
4951
50- For example
52+ For example:
5153
5254.. code-block :: console
5355
@@ -67,7 +69,8 @@ For example
6769 (__)\ )\/ ||----w |
6870 || ||
6971
70- To see a list of packages installed with pipx and which CLI applications are available, use ``pipx list ``.
72+ To see a list of packages installed with pipx and which applications are
73+ available, use ``pipx list ``:
7174
7275.. code-block :: console
7376
@@ -87,14 +90,14 @@ To see a list of packages installed with pipx and which CLI applications are ava
8790 - nox
8891 - tox-to-nox
8992
90- To upgrade or uninstall the package
93+ To upgrade or uninstall a package:
9194
9295.. code-block :: bash
9396
9497 pipx upgrade PACKAGE
9598 pipx uninstall PACKAGE
9699
97- `` pipx `` can be upgraded or uninstalled with pip
100+ pipx can be upgraded or uninstalled with pip:
98101
99102.. tab :: Unix/macOS
100103
@@ -109,25 +112,18 @@ To upgrade or uninstall the package
109112
110113 py -m pip install -U pipx
111114 py -m pip uninstall pipx
112-
113- ``pipx `` also allows you to install and run the latest version of a cli tool
114- in a temporary, ephemeral environment.
115-
116- .. code-block :: bash
117-
118- pipx run PACKAGE [ARGS]
119115
120- For example
116+ pipx also allows you to install and run the latest version of an application
117+ in a temporary, ephemeral environment. For example:
121118
122119.. code-block :: bash
123120
124121 pipx run cowsay moooo
125122
126- To see the full list of commands `` pipx `` offers, run
123+ To see the full list of commands pipx offers, run:
127124
128125.. code-block :: bash
129126
130127 pipx --help
131128
132- You can learn more about ``pipx `` at its homepage,
133- https://github.com/pypa/pipx.
129+ You can learn more about pipx at https://pypa.github.io/pipx/.
0 commit comments