[Solved] sys.stderr.write(f“ERROR: {exc}“) SyntaxError: invalid syntax

There was an error querying the version of Ubuntu after installing PIP3

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

Solution:

wget https://bootstrap.pypa.io/pip/3.5/get-pip.py

After downloading, execute the following command

python3 get-pip.py 

Read More: