Error in python3-pip installation


I am using Ubuntu 16.04 wherein I have installed Python 3.8.9.

There after I installed python3-pip with the command:

sudo apt install python3-pip -y

However, in the terminal when I give the command, $ pip3 -V

I get the following error message:

Traceback (most recent call last):
File "/home/biplob/.local/bin/pip3", line 7, in <module>
from pip._internal.cli.main import main
File "/home/biplob/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
SyntaxError: invalid syntax


Could you please help me to resolve this error.


Python 02-07-21, 10:36 a.m. meetbiplob
You can try the solutions suggested here https://stackoverflow.com/questions/65896334/python-pip-broken-with-sys-stderr-writeferror-exc

You can also alternatively use virtualenv which when activated gives you a workable pip setup
24-08-21, 10:58 a.m. ankitrj.iitb

Log-in to answer to this question.