From 2543651ec091954da84c890249138993f072e31a Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Mon, 22 Apr 2024 19:47:09 -0500 Subject: [PATCH] Add Use pipx To Install End User Apps as a Python TIL --- README.md | 3 +- python/use-pipx-to-install-end-user-apps.md | 31 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 python/use-pipx-to-install-end-user-apps.md diff --git a/README.md b/README.md index 1af5240..320f3bf 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1414 TILs and counting..._ +_1415 TILs and counting..._ --- @@ -825,6 +825,7 @@ _1414 TILs and counting..._ - [Access Instance Variables](python/access-instance-variables.md) - [Create A Dummy DataFrame In Pandas](python/create-a-dummy-dataframe-in-pandas.md) - [Test A Function With Pytest](python/test-a-function-with-pytest.md) +- [Use pipx To Install End User Apps](python/use-pipx-to-install-end-user-apps.md) ### Rails diff --git a/python/use-pipx-to-install-end-user-apps.md b/python/use-pipx-to-install-end-user-apps.md new file mode 100644 index 0000000..63018c5 --- /dev/null +++ b/python/use-pipx-to-install-end-user-apps.md @@ -0,0 +1,31 @@ +# Use pipx To Install End User Apps + +The [`pipx`](https://pipx.pypa.io/stable/) tool is an installer for the python +ecosystem. It differs from `pip` in that it is for installing end-user +applications and it does so in isolated environments. + +You can install `pipx` with an OS-specific installer like Homebrew: + +```bash +$ brew install pipx +``` + +Ensure `pipx`-installed apps are on your path: + +```bash +$ pipx ensurepath +``` + +Then use `pipx` to install programs like +[`cowsay`](https://pypi.org/project/cowsay/) or +[`llm`](https://llm.datasette.io/en/stable/setup.html): + +```bash +$ pipx install llm + +$ which llm +/Users/jbranchaud/.local/bin/llm + +$ llm --version +llm, version 0.13.1 +```