title: pip install customized include path
body: <p>I'm trying to install a library <code>pyleargist</code>. It requires another lib <code>libfftw3</code> to be manually installed which I've installed. Since I don't have the root privilege, I have to install <code>libfftw3</code> under my home directory: <code>~/usr/include</code> and <code>~/usr/lib</code>. Then I follow this post: <a href="https://superuser.com/questions/242190/how-to-install-matplotlib-on-os-x">https://superuser.com/questions/242190/how-to-install-matplotlib-on-os-x</a>, added:</p>
  
  <pre><code>export LDFLAGS="-L~/usr/lib"
  export CFLAGS="-I~/usr/include 
  </code></pre>
  
  <p>So that <code>pip</code> knows it have to consult <code>/usr</code> to get the include (<em>.h files) and lib (</em>.a, *.so files). However, while running <code>pip install --user pyleargist</code>, it complains about:</p>
  
  <pre><code>gcc-4.4.real: src/leargist.c: No such file or directory
  gcc-4.4.real: no input files
  error: command 'gcc' failed with exit status 1
  </code></pre>
  
  <p>I guess what happened is that the path is incorrect so that it can't find the <code>*.c</code> files (I think <code>pip</code> should have downloaded the file somewhere but not sure where it is).</p>
  
  <p>So my questions are the following: 1) in this particular case, how can I install <code>pyleargist</code> with <code>include</code> and <code>lib</code> path under <code>~/usr</code>? 2) more generally, how can one provide additional path for <code>pip</code> so that it knows where to get the additional include files or libs if not found in the default path?</p>
  
  <p>p.s I am on an <code>ubuntu</code> machine without <code>sudo</code> privilege.</p>
  
  <p>ref: <br/>
  <a href="https://pypi.python.org/pypi/pyleargist/1.0.1" rel="noreferrer">https://pypi.python.org/pypi/pyleargist/1.0.1</a> <br/>
  <a href="http://www.fftw.org/" rel="noreferrer">http://www.fftw.org/</a></p>