title: Cannot install uWSGI on Ubuntu 14.04 with Python 3.4 (paths?)
body: <p>The big picture is that I want Ubuntu server with nginx, uWGI, and Python 3 (virtualenv) to start some project.</p>
  
  <p>I did follow recommendation that can be found on various places. When trying to install uWSGI using the <code>sudo pip install uwsgi</code>, I do observe the following error:</p>
  
  <pre><code>plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
  </code></pre>
  
  <p>I did find the [J.F.Sebastian's comment][1] from September 2012 about the neccessity to <code>$ sudo apt-get install python2.7-dev</code> -- it was for Python 2.7. So, I did the similar for Python 3.4 (seems successfully). However, I still observer the error.</p>
  
  <p>When trying to search for the <code>Python.h</code>, I can find:</p>
  
  <pre><code>$ locate Python.h
  /usr/include/python3.4m/Python.h
  </code></pre>
  
  <p>What else should I set to make uWSGI installed? (I am rather new to Ubuntu Linux, even though I did work with Unix far in the middle age ;)</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Following the jwalker's advice from the comment below, I did <code>pip install uwsgi</code> from within activated virtualenv and without <code>sudo</code>. But then the installer cannot create subdirectories (like <code>build</code>) in the venv directory. I tried to <code>chmod go+w</code> for the venv, but it did not help. I admit I know nothing about virtualenv and pip, and also my Unix knowledge is a bit rusty: </p>
  
  <pre><code>  ...
    File "/var/www/hec_project/hec_venv/lib/python3.4/site-packages/pip/req.py", line 218, in build_location
      _make_build_dir(build_dir)
    File "/var/www/hec_project/hec_venv/lib/python3.4/site-packages/pip/req.py", line 1527, in _make_build_dir
      os.makedirs(build_dir)
    File "/var/www/hec_project/hec_venv/lib/python3.4/os.py", line 237, in makedirs
      mkdir(name, mode)
  PermissionError: [Errno 13] Permission denied: '/var/www/hec_project/hec_venv/build'
  
  Storing debug log for failure in /home/hecadmin/.pip/pip.log
  </code></pre>