title: Python Pygame OSx error relating to El Capitan System
body: <p>I'm installing PyGame on to OSx ElCapitan with a System install of 2.7 and Brew install of Python3 following <a href="http://florian-berger.de/en/articles/installing-pygame-for-python-3-on-os-x/" rel="nofollow">this blog post</a>.  The brew install Python3 worked fine with</p>
  
  <pre><code>sudo pip3 install hg+http://bitbucket.org/pygame/pygame
  </code></pre>
  
  <p>But </p>
  
  <pre><code>sudo pip install hg+http://bitbucket.org/pygame/pygame 
  </code></pre>
  
  <p>runs into the following error</p>
  
  <pre><code>running install_headers
  creating /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pygame
  
  
  error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pygame': Operation not permitted
  
  
  Rolling back uninstall of pygame
  Command "/usr/bin/python -c "import setuptools, tokenize;
  __file__='/tmp/pip-wepMKN-build/setup.py';
  exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
  install --record /tmp/pip-sWpHWA-record/install-record.txt 
  --single-version-externally-managed --compile" 
  failed with error code 1 in /tmp/pip-wepMKN-build
  </code></pre>
  
  <p>which I believe is related to the new <a href="https://en.wikipedia.org/wiki/System_Integrity_Protection" rel="nofollow">System Integrity Protection</a> in El Capitan.  Everything was updated and doctored before so the system is running well otherwise.</p>
  
  <p>Any help on how I can overcome this would be awesome and helpful to many I'm sure.</p>
  
  <p>Thanks</p>
  
  <p>Chris</p>