pipx is a package management tool that allows users to install Python applications that can easily run from the command-line interface. It’s different from “pip” since it adds an isolated environment to the system and ensures that installed applications can easily run on your system. On the other hand, “pip” doesn’t have any isolated environment; however, it’s useful for users who want to install Python libraries and dependencies.
This article is an easy guide to install pipx on the Raspberry Pi.
Install pipx on Raspberry Pi
There are two methods to install pipx on Raspberry Pi:
Method 1: Install pipx Through Default Raspberry Pi Repository
You can directly install pipx on Raspberry Pi from system repository through below-given command:
After the installation, check pipx version using the following command:
Remove pipx from Raspberry Pi
You can remove pipx installed from Raspberry Pi repository using the following command:
Method 2: Install pipx Through pip
The above method installs the pipx older version on the Raspberry Pi system. However, you can install latest version of pipx on Raspberry Pi through pip using the following command:
Note: You can install pip on the Raspberry Pi system from here.
Before running the “pipx” version command, you can to set the Path variable inside the following file:
Inside this file, add the line given below at the end:
Save this file using “CTRL+X”, add “Y” and press enter to exit.
To apply the above changes, hit the following command:
You can now check pipx version using the following command to confirm its installation on Raspberry Pi system:
Install Application Through pipx
You can install the application through pipx in the same way as you do via pip. Follow the below-given command if you want to install the QRCode application on your Raspberry Pi system.
Remove pipx from Raspberry Pi
Execute the following command to remove pipx from Raspberry Pi installed from pip.
Enter “y” to confirm removing pipx from the Raspberry Pi system.
Conclusion
pipx is a Python package management tool for installing Python applications that can run from the terminal. You can install this tool on Raspberry Pi with the “apt” command or pip installer. The “apt” command installs an older version of pipx, while pip installs the latest version of it on the Raspberry Pi system. However, for pipx installation through pip, you must add a path variable to run the pipx-related commands in the terminal.