title: Installing Numpy locally
body: <p>I have an account in a remote computer without root permissions and I needed to install a local version of Python (the remote computer has a version of Python that is incompatible with some codes I have), Numpy and Scipy there. I've been trying to install numpy locally since yesterday, with no success. </p>
  
  <p>I successfully installed a local version of Python (2.7.3) in /home/myusername/.local/, so I access to this version of Python by doing <code>/home/myusername/.local/bin/python</code>. I tried two ways of installing Numpy:</p>
  
  <ol>
  <li><p>I downloaded the lastest stable version of Numpy from the official webpage, unpacked it, got into the unpacked folder and did: <code>/home/myusername/.local/bin/python setup.py install --prefix=/home/myusername/.local</code>. However, I get the following error, which is followed by a series of other errors (deriving from this one):</p>
  
    <pre class="lang-none prettyprint-override"><code>gcc -pthread -shared build/temp.linux-x86_64-2.7/numpy/core/blasdot/_dotblas.o
  -L/usr/local/lib -Lbuild/temp.linux-x86_64-2.7 -lptf77blas -lptcblas -latlas 
  -o build/lib.linux-x86_64-2.7/numpy/core/_dotblas.so
  /usr/bin/ld: /usr/local/lib/libptcblas.a(cblas_dptgemm.o): relocation 
  R_X86_64_32 against `a local symbol' can not be used when making a shared 
  object; recompile with -fPIC
  </code></pre>
  
  <p>Not really knowing what this meant (except that the error apparently has to do with the LAPACK library), I just did the same command as above, but now putting LDFLAGS='-fPIC', as suggested by the error i.e., I did 
  <code>LDFLAGS="-fPIC" /home/myusername/.local/bin/python setup.py install --prefix=/home/myusername/.local</code>. 
  However, I got the same error (except that the prefix -fPIC was addeded after the gcc command above).</p></li>
  <li><p>I tried installing it using pip, i.e., doing <code>/home/myusername/.local/bin/pip install numpy</code> /after successfully instaling pip in my local path). However, I get the exact same error.</p></li>
  </ol>
  
  <p>I searched on the web, but none of the errors seemed to be similar to mine. My first guess is that this has to do with some piece of code that needs root permissions to be executed, or maybe with some problem with the version of the LAPACK libraries. </p>
  
  <p>Help, anyone?</p>