Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I posted this question originally on StackOverflow, but a user suggested I moved it here so here I go!

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.

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 /home/myusername/.local/bin/python. I tried two ways of installing Numpy:

  1. I downloaded the lastest stable version of Numpy from the official webpage, unpacked it, got into the unpacked folder and did: /home/myusername/.local/bin/python install --prefix=/home/myusername/.local. However, I get the following error, which is followed by a series of other errors (deriving from this one):

    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/
    /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

    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 LDFLAGS="-fPIC" /home/myusername/.local/bin/python install --prefix=/home/myusername/.local. However, I got the same error (except that the prefix -fPIC was addeded after the gcc command above).

  2. I tried installing it using pip, i.e., doing /home/myusername/.local/bin/pip install numpy /after successfully instaling pip in my local path). However, I get the exact same error.

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 or with gcc (gcc version 4.1.2 is installed on the remote computer).

Help, anyone?

share|improve this question

No, there is no need for root privileges when compiling numpy. I just did this very same thing on my computer a little while ago without root at all. I do not believe that there is any need for the --prefix command. Try using the --user option instead with install --user. This option automatically does what you are trying to do.

If this does not help, I would check your version of gcc and LAPACK. Perhaps if you cannot update these then you may want to try an older version of numpy.

share|improve this answer
Using --user I get the same error. The problem is that I have to work with the lastest version of Numpy... – Néstor Jun 5 '12 at 1:09
Update: the lowest version of Numpy that I have to install so everything runs ok in my codes is 1.4.1. However, I got the same error as I describe even installing that version (the lastest is 1.6). In the remote computer, there's an old version of numpy (1.2.1), so I suppose the versions of gcc and LAPACK could be the problems. – Néstor Jun 5 '12 at 1:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.