title: Error Installing "psycopg2" python module for creating connection to PostgreSQL via Python 2.7 on macOS
body: <p>also tried installing psycopg2-binary as well but same error (not sure what am I missing here, new to PostgreSQL and PyCharm)</p>
  
  <pre><code>pip install psycopg2
  pip install psycopg2-binary
  </code></pre>
  
  <p><strong>Error message</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/local/bin/pip", line 9, in &lt;module&gt;
      load_entry_point('pip==7.1.0', 'console_scripts', 'pip')()
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
      return get_distribution(dist).load_entry_point(group, name)
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
      return ep.load()
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
      return self.resolve()
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2365, in resolve
      raise ImportError(str(exc))
  ImportError: 'module' object has no attribute 'main'
  </code></pre>