There is a simpler solution to install pip
locally in your system without the need for root(sudo) permissions.
chmod +x pip.pyz
python3 -m pip.pyz --upgrade pip
That is all, It will work and you will now have pip installed locally on your system.
If Externally-managed-environment error occurs: just add --break-system-packages in the end of command.
Example:python3 -m pip.pyz --upgrade pip --break-system-packages
Note: Upvote this answers if this worked for you! Personally tested solution!