title: getting Invalid syntax error on pip install
body: <p>When I try to install anything via pip, I get this error. How to fix it?</p>
  <pre><code> % pip install --upgrade pip
  Traceback (most recent call last):
    File &quot;/usr/local/bin/pip&quot;, line 11, in &lt;module&gt;
      load_entry_point('pip==21.0.1', 'console_scripts', 'pip')()
    File &quot;/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py&quot;, line 489, in load_entry_point
      return get_distribution(dist).load_entry_point(group, name)
    File &quot;/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py&quot;, line 2843, in load_entry_point
      return ep.load()
    File &quot;/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py&quot;, line 2434, in load
      return self.resolve()
    File &quot;/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py&quot;, line 2440, in resolve
      module = __import__(self.module_name, fromlist=['__name__'], level=0)
    File &quot;/Library/Python/2.7/site-packages/pip-21.0.1-py2.7.egg/pip/_internal/cli/main.py&quot;, line 60
      sys.stderr.write(f&quot;ERROR: {exc}&quot;)
                                     ^
  SyntaxError: invalid syntax
  </code></pre>