Welcome to Raspberry Pi 5 repository
2.Use APT to install Python packages
Install Python Packages with APT
If you are using the factory image we provided, manual installation and configuration are not required.
APT (Advanced Packaging Tool) is a software package management tool used for installing, upgrading, and managing software packages on Debian and Ubuntu systems.
Install python3-build-hat
This installation method has been tested. The packages are usually pre-compiled, so installation is faster and designed for Raspberry Pi OS.
sudo apt install python3-build-hat

Install pip
To install Python packages using APT, first ensure that Python and pip are installed:
(The system has these tools installed by default. If not installed, run the following command:)
xxxxxxxxxxsudo apt install python3-pip
Using pip, you can download and install specified Python packages from the Python Package Index.