Let’s take a look at how pipx can make it easy to install and manage them.
BrowsingGitHuborPyPIthe Python Package Indexyou can find tons of useful apps alongside programming libraries.
Most installation instructions tell you to install using pip, the package manager for python.
Hannah Stryker / How-To Geek
Dependencies are still installed system-wide for that user, which can still cause problems as well.
These are just some of the challenges users might face getting Python apps working on their system.
pipx to the Rescue
To solve our problems, we can use an program called pipx.
This is a user-friendly alternative to pip that’s aimed at end-users instead of programmers.
This is strictly for users!
To install pipx, the most straightforward way is to use your system’s package manager.
First, let’s see to it the required packages are installed.
If you’re on a Debian-based distribution like Ubuntu, you’re able to use apt.
This will drop in the core packages for virtual environments and the pip package manager.
Many Linux distributions will have these preinstalled, but not all.
Next, we can implement the pipx package itself.
We just need to run this pipx command:
Notice that there is no sudo for this command!
On Rhino Linux, things worked immediately, but on Ubuntu I had to bounce and in again.
And that’s it, pipx is ready to go!
Let’s take a look at how to use it with some Python apps.
Installing Python CLI Apps
Let’s install a fun app called cowsay using pipx.
you could use the Python app just as if it was a standard Linux command or app we installed.
There are some caveats to the formatting, so be sure to check out theofficial pipx documentation.
it’s possible for you to use pipx to see which installed Python apps you installed.
it’s possible for you to see thatspeedtest-cliis not installed, butcowsayis still present on our system.
you might also uninstall the cowsay app easily.
Where pipx really helps is in managing more complex applications.