title: uWSGI installation exception on Amazon Linux EC2 instance
body: <p>I'm a newbie trying to set a server for my first phone-App on Amazon EC2 with nginx, django, uWSGI and mySQL.</p>
  
  <p>I'm following those tutorials (actually the second is based on the first one):</p>
  
  <p><a href="http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html" rel="noreferrer">http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html</a>
  <a href="http://www.oliverelliott.org/article/computing/tut_setup_nginx_django/" rel="noreferrer">http://www.oliverelliott.org/article/computing/tut_setup_nginx_django/</a></p>
  
  <p>I'm using a MacbookPro and once in terminal I ssh into the Amazon Linux EC2 instance.
  When it comes to install uwsgi..troubles arise.
  I executed:</p>
  
  <pre><code>$ sudo yum install python-pip
  $ sudo yum install python-devel
  $ sudo pip install uwsgi
  </code></pre>
  
  <p>First two worked fine, last command thrown an exception:</p>
  
  <pre><code>    Downloading/unpacking uwsgi
    Running setup.py egg_info for package uwsgi
  Installing collected packages: uwsgi
    Running setup.py install for uwsgi
      using profile: buildconf/default.ini
      detected include path: ['/usr/include', '/usr/local/include']
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "/tmp/pip-build-root/uwsgi/setup.py", line 109, in &lt;module&gt;
          distclass=uWSGIDistribution,
        File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
          dist.run_commands()
        File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
          self.run_command(cmd)
        File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-root/uwsgi/setup.py", line 71, in run
          conf = uc.uConf(get_profile())
        File "uwsgiconfig.py", line 687, in __init__
          raise Exception("you need a C compiler to build uWSGI")
      Exception: you need a C compiler to build uWSGI
      Complete output from command /usr/bin/python26 -c "import setuptools;__file__='/tmp/pip-build-root/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l8npX4-record/install-record.txt --single-version-externally-managed:
      running install
  
  using profile: buildconf/default.ini
  
  detected include path: ['/usr/include', '/usr/local/include']
  
  Traceback (most recent call last):
  
    File "&lt;string&gt;", line 1, in &lt;module&gt;
  
    File "/tmp/pip-build-root/uwsgi/setup.py", line 109, in &lt;module&gt;
  
      distclass=uWSGIDistribution,
  
    File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
  
      dist.run_commands()
  
    File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
  
      self.run_command(cmd)
  
    File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
  
      cmd_obj.run()
  
    File "/tmp/pip-build-root/uwsgi/setup.py", line 71, in run
  
      conf = uc.uConf(get_profile())
  
    File "uwsgiconfig.py", line 687, in __init__
  
      raise Exception("you need a C compiler to build uWSGI")
  
  Exception: you need a C compiler to build uWSGI
  
  ----------------------------------------
  Command /usr/bin/python26 -c "import setuptools;__file__='/tmp/pip-build-root/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l8npX4-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/uwsgi
  Storing complete log in /root/.pip/pip.log
  </code></pre>
  
  <p>I've tried two suggestions I read, but doesn't seem to work for me:</p>
  
  <pre><code>$ export CC=gcc &amp;&amp; pip install -r requirements.txt 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ sudo CC=gcc pip install uwsgi
  </code></pre>
  
  <p>Any suggestions? Thanks a lot in advance!!</p>