10

I am installing Scipy-0.16.1 on Ubuntu 14.04

OpenBLAS_0.2.18 and Numpy-1.11.0 have been installed with no issues.

Scipy-0.16.1.tar.gz has been downloaded

site.cfg was copied and un-commented the following lines:

[openblas]

libraries = openblas

library_dirs = /opt/OpenBLAS/lib

include_dirs = /opt/OpenBLAS/include

Added a line to ~/.bashrc

export LD_LIBRARY_PATH=/opt/OpenBLAS/lib:$LD_LIBRARY_PATH

source ~/.bashrc

ldconfig

sudo python setup.py config

ERROR

ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

devlin carnate
  • 8,309
  • 7
  • 48
  • 82
George Liu
  • 101
  • 1
  • 1
  • 3

3 Answers3

23

You have to install OpenBlas system library. Try:

sudo apt-get install libopenblas-dev
Francesco Nazzaro
  • 2,688
  • 11
  • 20
3

Firstly, try locate libopenblas.so.0 to find out the path.

Then, do echo $LD_LIBRARY_PATH to check if it has been included.

qun
  • 711
  • 8
  • 7
1

In my case, I am using Ubuntu 20.04 and I have scipy on 1.2.1. This causes the error above.

The reason is scipy 1.2.1 looks for libopenblas.so.0. But, Ubuntu 20.04 APT repo libraries will only support libopenblas.so.

So, my solution was to upgrade scipy to 1.4.0 or above.

Yao Hong Kok
  • 165
  • 2
  • 12