Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed Ubuntu 12.04 64 bit. I need to work with python and scipy, I installed them and when I run the test:

python -c "import scipy; scipy.test()"

I get the message:

ImportError: libatlas.so.3gf: cannot open shared object file: No such file or directory

However, I have libatlas libraries installed under the directory /usr/lib/atlas-base. I know I can copy the files directly under /usr/lib, but I wonder how I could setup the scipy to use the libraries from usr/lib/atlas-base?

share|improve this question
    
Please do not cross post. –  Karlson Oct 23 '12 at 18:11
    
Ok, removed now. –  lmsasu Oct 23 '12 at 18:28

1 Answer 1

up vote 6 down vote accepted

You don't have to copy anything anywhere.

You should add the atlas libraries to the list of locations ld will search.

In directory /etc/ld.so.conf.d you can add the file atlas-lib.conf. This file should contain the directory of libatlas.so.3gf, which is /usr/lib/atlas-base.

You can do this by running

echo "/usr/lib/atlas-base" | sudo tee /etc/ld.so.conf.d/atlas-lib.conf

Finally run

sudo ldconfig

to update ld so that it knows about this new file.

Alternatively you can set LD_LIBRARY_PATH to include the path to the library when you run and it should be available within SciPy.

share|improve this answer
    
I am not sure whether the atlas-lib.conf was of help, but the LD_LIBRARY_PATH made the trick. –  lmsasu Oct 23 '12 at 18:36
1  
@lmsasu When you create that file you will need to run sudo ldconfig to make it active –  Karlson Oct 23 '12 at 18:40

Your Answer

 
discard

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.