title: How to get PyQt4 working with PyCharm
body: <p>So I'm trying to get a program that uses PyQt4 to work in PyCharm on my Mac, but whenever it tries to run, it says</p>
  
  <blockquote>
    <p>INFO: Could not import backend "PyQt4":</p>
    
    <p>No module named PyQt4</p>
  </blockquote>
  
  <p>Trying to import PyQt4 using PyCharm's Package Manager generates this error:</p>
  
  <blockquote>
    <p>Executed Command:</p>
    
    <blockquote>
      <p>pip install PyQt4</p>
    </blockquote>
    
    <p>Error Occurred:</p>
    
    <blockquote>
      <p>0:428: execution error: The directory '/Users/pkillam/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.</p>
    </blockquote>
    
    <p>Proposed Solution:</p>
    
    <blockquote>
      <p>Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7'.</p>
    </blockquote>
  </blockquote>
  
  <p>This only happens to certain packages which pip doesn't like, particularly those which use <code>configure.py</code> instead of <code>setup.py</code> as explained <a href="http://movingthelamppost.com/blog/html/2013/07/12/installing_pyqt____because_it_s_too_good_for_pip_or_easy_install_.html" rel="noreferrer">here</a>.  </p>
  
  <p>Attempting to run the command from the console generates this error:</p>
  
  <blockquote>
    <p>$ pip install PyQt4</p>
    
    <p>Collecting PyQt4
      Could not find a version that satisfies the requirement PyQt4 (from versions: )
    No matching distribution found for PyQt4</p>
    
    <p>$</p>
  </blockquote>
  
  <p>Now, installing the package using homebrew claims to be successful, but I still get the initial error that PyQt could not be imported after homebrew installs it.. somewhere.</p>
  
  <p>I've been running around in circles with this for the past day, any ideas?</p>