Welcome to DOFBOT-Pi repository
2.Use APT to install Python packages
Install Python packages using APT
APT (Advanced Packaging Tool) is a software package management tool used to install, upgrade and manage software packages on Debian and Ubuntu systems.
Install python3-build-hat
The packages for this installation method are tested, often precompiled so they install faster, and are designed for Raspberry Pi OS.
sudo apt install python3-build-hat

Install pip
To use APT to install Python packages, first you need to ensure that Python and pip tools are installed:
(The system has these two tools installed by default. If they are not installed, you can enter the following command to install them)
xxxxxxxxxxsudo apt install python3-pip
Use pip to download and install specified Python packages from the Python package index.