title: pip: sys.stderr.write(f"ERROR: {exc}") with Python 3.5
body: <p>i am having a trouble with pip and pip3.
  I am trying to install requirements and it shows an error. When i write pip3 or pip --version it show this error.</p>
  <pre><code>jumphost@jumphost-VirtualBox:~$ pip3 --version
  Traceback (most recent call last):
    File &quot;/usr/bin/pip3&quot;, line 9, in &lt;module&gt;
      from pip import __main__
    File &quot;/usr/local/lib/python3.5/dist-packages/pip/__main__.py&quot;, line
  21, in &lt;module&gt;
      from pip._internal.cli.main import main as _main
    File
  &quot;/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py&quot;, line 60
      sys.stderr.write(f&quot;ERROR: {exc}&quot;)
                                     ^
  SyntaxError: invalid syntax
  </code></pre>
  <p>If i am trying to install, it showed this</p>
  <pre><code>jumphost@jumphost-VirtualBox:~/kubespray$ pip install -r requirements.txt
  Traceback (most recent call last):
    File &quot;/usr/bin/pip&quot;, line 9, in &lt;module&gt;
      from pip import __main__
    File
  &quot;/usr/local/lib/python2.7/dist-packages/pip-21.0-py2.7.egg/pip/__main__.py&quot;,
  line 21, in &lt;module&gt;
      from pip._internal.cli.main import main as _main
    File
  &quot;/usr/local/lib/python2.7/dist-packages/pip-21.0-py2.7.egg/pip/_internal/cli/main.py&quot;,
  line 60
      sys.stderr.write(f&quot;ERROR: {exc}&quot;)
                                     ^
  SyntaxError: invalid syntax
  jumphost@jumphost-VirtualBox:~/kubespray$ pip3 install -r requirements.txt
  Traceback (most recent call last):
    File &quot;/usr/bin/pip3&quot;, line 9, in &lt;module&gt;
      from pip import __main__
    File &quot;/usr/local/lib/python3.5/dist-packages/pip/__main__.py&quot;, line
  21, in &lt;module&gt;
      from pip._internal.cli.main import main as _main
    File
  &quot;/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py&quot;, line 60
      sys.stderr.write(f&quot;ERROR: {exc}&quot;)
                                     ^
  SyntaxError: invalid syntax
  </code></pre>
  <p>I didn't found a right answer so this is the reason why i ask you. Thanks !
  I tried remove python, pip, python3 and pip3 multipletimes but still same problem.</p>