title: Can't install pygame with pip as there is an error whilst runningvsetup.py bdist_wheel for pygame
body: <p>I am trying to install pygame for Python 3 on an anaconda install.</p>
  
  <p>I run <code>pip install pygame</code>, and it outputs the following:</p>
  
  <pre><code>Collecting pygame
    Using cached pygame-1.9.3.tar.gz
  Building wheels for collected packages: pygame
    Running setup.py bdist_wheel for pygame ... error
    Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/tmpybu68q2lpip-wheel- --python-tag cp35:
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-x86_64-3.5
    creating build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/_camera_opencv_highgui.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/_camera_vidcapture.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/_dummybackend.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/_numpysndarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/_numpysurfarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/camera.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/colordict.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/compat.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/cursors.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/font.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/freetype.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/ftfont.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/locals.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/macosx.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/midi.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/pkgdata.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/sndarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/sprite.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/surfarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/sysfont.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    copying lib/version.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
    copying lib/gp2x/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
    copying lib/gp2x/constants.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
    copying lib/gp2x/locals.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/threads
    copying lib/threads/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/threads
    copying lib/threads/Py25Queue.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/threads
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/__main__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/base_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/blit_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/bufferproxy_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/camera_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/cdrom_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/cdrom_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/color_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/compat_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/cursors_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/display_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/draw_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/event_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/fastevent_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/font_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/font_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/freetype_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/freetype_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/ftfont_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/ftfont_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/gfxdraw_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/image__save_gl_surface_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/image_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/image_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/imageext_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/imageext_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/joystick_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/key_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/mask_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/math_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/midi_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/midi_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/mixer_music_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/mixer_music_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/mixer_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/mixer_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/mouse_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/overlay_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/pixelarray_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/pixelcopy_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/rect_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/rwobject_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/scrap_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/scrap_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/sndarray_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/sndarray_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/sprite_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/surface_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/surfarray_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/surfarray_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/surflock_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/sysfont_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/test_test_.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/threads_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/time_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    copying test/transform_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/arrinter.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/async_sub.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/buftools.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/endian.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/png.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/run_tests.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/test_machinery.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    copying test/test_utils/test_runner.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
    copying test/run_tests__tests/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
    copying test/run_tests__tests/run_tests__test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/fake_2_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/fake_3_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/fake_4_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/fake_5_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/fake_6_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/no_assertions__ret_code_of_1__test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    copying test/run_tests__tests/all_ok/zero_tests_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/failures1
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
    copying test/run_tests__tests/incomplete_todo/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
    copying test/run_tests__tests/incomplete_todo/fake_2_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
    copying test/run_tests__tests/incomplete_todo/fake_3_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/fake_2_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/invisible_tag_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/magic_tag_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
    copying test/run_tests__tests/timeout/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
    copying test/run_tests__tests/timeout/fake_2_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
    copying test/run_tests__tests/timeout/sleep_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/fake_2_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/incomplete_todo_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/magic_tag_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/sleep_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/docs
    copying docs/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/docs
    copying docs/__main__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/docs
    creating build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/aacircle.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/aliens.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/arraydemo.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/blend_fill.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/blit_blends.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/camera.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/chimp.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/cursors.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/eventlist.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/fastevents.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/fonty.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/freetype_misc.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/glcube.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/headless_no_windows_needed.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/liquid.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/mask.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/midi.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/moveit.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/oldalien.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/overlay.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/pixelarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/playmus.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/prevent_display_stretching.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/scaletest.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/scrap_clipboard.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/scroll.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/sound.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/sound_array_demos.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/stars.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/testsprite.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    copying examples/vgrade.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
    running build_ext
    building 'pygame.scrap' extension
    creating build/temp.macosx-10.6-x86_64-3.5
    creating build/temp.macosx-10.6-x86_64-3.5/src
    /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I//anaconda/include -arch x86_64 -DENABLE_NEWBUF=1 -I/NEED_INC_PATH_FIX -I//anaconda/include/python3.5m -c src/scrap.c -o build/temp.macosx-10.6-x86_64-3.5/src/scrap.o
    src/scrap.c:27:10: fatal error: 'SDL.h' file not found
    #include "SDL.h"
             ^
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
  
    ----------------------------------------
    Failed building wheel for pygame
    Running setup.py clean for pygame
  Failed to build pygame
  Installing collected packages: pygame
    Running setup.py install for pygame ... error
      Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-yhcf0tlb-record/install-record.txt --single-version-externally-managed --compile:
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.6-x86_64-3.5
      creating build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/_camera_opencv_highgui.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/_camera_vidcapture.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/_dummybackend.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/_numpysndarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/_numpysurfarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/camera.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/colordict.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/compat.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/cursors.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/font.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/freetype.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/ftfont.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/locals.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/macosx.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/midi.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/pkgdata.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/sndarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/sprite.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/surfarray.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/sysfont.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      copying lib/version.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
      copying lib/gp2x/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
      copying lib/gp2x/constants.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
      copying lib/gp2x/locals.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/threads
      copying lib/threads/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/threads
      copying lib/threads/Py25Queue.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/threads
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/__main__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/base_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/blit_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/bufferproxy_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/camera_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/cdrom_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/cdrom_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/color_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/compat_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/cursors_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/display_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/draw_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/event_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/fastevent_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/font_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/font_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/freetype_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/freetype_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/ftfont_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/ftfont_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/gfxdraw_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/image__save_gl_surface_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/image_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/image_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/sprite_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/surface_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/surfarray_tags.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/surfarray_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/surflock_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/sysfont_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/test_test_.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/threads_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/time_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      copying test/transform_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/arrinter.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/async_sub.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/buftools.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/endian.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/png.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/run_tests.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/test_machinery.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      copying test/test_utils/test_runner.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
      copying test/run_tests__tests/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
      copying test/run_tests__tests/run_tests__test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
      copying test/run_tests__tests/all_ok/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
      copying test/run_tests__tests/all_ok/fake_2_test.py -&gt; 
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
      copying test/run_tests__tests/print_stdout/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
      copying test/run_tests__tests/print_stdout/fake_2_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
      copying test/run_tests__tests/print_stdout/fake_3_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
      copying test/run_tests__tests/print_stdout/fake_4_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
      copying test/run_tests__tests/incomplete_todo/__init__.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
      copying test/run_tests__tests/incomplete_todo/fake_2_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
      copying test/run_tests__tests/incomplete_todo/fake_3_test.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
      creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
      copying test/run_tests__tests/exclude/__init__.py -&gt; 
      copying examples/sound.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
      copying examples/sound_array_demos.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
      copying examples/stars.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
      copying examples/testsprite.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
      copying examples/vgrade.py -&gt; build/lib.macosx-10.6-x86_64-3.5/pygame/examples
      running build_ext
      building 'pygame.scrap' extension
      creating build/temp.macosx-10.6-x86_64-3.5
      creating build/temp.macosx-10.6-x86_64-3.5/src
      /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I//anaconda/include -arch x86_64 -DENABLE_NEWBUF=1 -I/NEED_INC_PATH_FIX -I//anaconda/include/python3.5m -c src/scrap.c -o build/temp.macosx-10.6-x86_64-3.5/src/scrap.o
      src/scrap.c:27:10: fatal error: 'SDL.h' file not found
      #include "SDL.h"
               ^
      1 error generated.
      error: command '/usr/bin/clang' failed with exit status 1
  
      ----------------------------------------
  Command "//anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-yhcf0tlb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/
  </code></pre>
  
  <p>Yes, it's huge! I have cut out loads of lines like <code>copying lib/...</code> to fit inside the 30,000 character limit of SE.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>pip install pygame
  pip install pygame --no-cache-dir
  pip install pygame --force-reinstall
  pip install pygame --no-binary :all:
  pip install pygame --no-use-wheel
  </code></pre>
  
  <p>They all gave basically the same error.</p>
  
  <p>I can't work out what is wrong, as this is a brand new install of anaconda.</p>
  
  <p>The lines:</p>
  
  <pre><code>#include "SDL.h"
               ^
      1 error generated.
      error: command '/usr/bin/clang' failed with exit status 1
  </code></pre>
  
  <p>are obviously the most important part, which implies a bug in the code. Is there an obvious error here? If it is a Python script, then it shouldn't be run, as it is commented out.</p>
  
  <p>I've googled the error, and other people with a similar error like <a href="https://stackoverflow.com/questions/25994429/mysql-python-on-mac-osx-10-9-2-error-command-usr-bin-clang-failed-with-exit">here</a> needed to run <code>xcode-select --install</code> to solve it.</p>
  
  <p>If I run that, I get this:</p>
  
  <pre><code>xcode-select: error: command line tools are already installed, use "Software Update" to install updates
  </code></pre>
  
  <p>So that is not my problem.</p>
  
  <p>There is also the important line:</p>
  
  <pre><code>Running setup.py bdist_wheel for pygame ... error
  </code></pre>
  
  <p>Does anyone have any insights that might help me?</p>