title: Problems installing pygame
body: <p>I'm trying to install and run pygame using the text editor Sublime Text and python 3 (I think).  I've tried installing several times and am still getting the following error message from ST when I try and import pygame:</p>
  
  <pre><code>import pygame
  </code></pre>
  
  <blockquote>
    <p>Traceback (most recent call last):<br>
      File "/Users/Hank/Desktop/python_work/Chapter_12_alien_invasion/test1.py", line 1, in <br>
        import pygame<br>
    ModuleNotFoundError: No module named 'pygame'<br>
    [Finished in 0.1s with exit code 1]<br>
    [cmd: ['/usr/local/bin/python3', '-u', '/Users/Hank/Desktop/python_work/Chapter_12_alien_invasion/test1.py']]<br>
    [dir: /Users/Hank/Desktop/python_work/Chapter_12_alien_invasion]<br>
    [path: /Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]  </p>
  </blockquote>
  
  <p>I followed this tutorial: <a href="http://brysonpayne.com/2015/01/10/setting-up-pygame-on-a-mac/" rel="nofollow noreferrer">http://brysonpayne.com/2015/01/10/setting-up-pygame-on-a-mac/</a></p>
  
  <p>The relevant command is here: </p>
  
  <pre><code>sudo pip3 install hg+http://bitbucket.org/pygame/pygame
  </code></pre>
  
  <p>But even though I use 'sudo', I still get this message:</p>
  
  <blockquote>
    <p>The directory '/Users/Hank/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.<br>
    The directory '/Users/Hank/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.</p>
  </blockquote>
  
  <p>I'm sorry - I know many people ask this question, but I am just clueless what to do now.  Thank you for your help.</p>
  
  <p>This is the error message I receive when I try <code>pip3 install --user  hg+http://bitbucket.org/pygame/pygame</code>: </p>
  
  <p>Failed building wheel for pygame</p>
  
  <p>Here is a link to the full text of the message I receive after trying to install:</p>
  
  <p><a href="https://pastebin.com/hZKU8VUZ" rel="nofollow noreferrer">https://pastebin.com/hZKU8VUZ</a></p>