Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link error with cblas when installing scikit-learn

On my RHEL7, I am trying to install py-earth and getting this link error:

/usr/bin/ld: cannot find -lcblas

I have packages blas, blas-devel, atlas and atlas-devel installed.

The compilation command printed after this error specifies

-L/usr/lib64/atlas -lcblas -lm ....

And for completeness, the directory /usr/lib64/atlas contains the following files and symlinks

libsatlas.so -> libsatlas.so.3.10
libsatlas.so.3 -> libsatlas.so.3.10
libsatlas.so.3.10
libtatlas.so -> libtatlas.so.3.10
libtatlas.so.3 -> libtatlas.so.3.10
libtatlas.so.3.10

Any help?

like image 677
Alberto Contador Avatar asked Nov 04 '15 16:11

Alberto Contador


People also ask

What must be installed before you use scikit-learn?

The library is built upon the SciPy (Scientific Python) that must be installed before you can use scikit-learn.

How do I install a specific version of scikit-learn?

Download the source package from http://pypi.python.org/pypi/scikit-learn/ , unpack the sources and cd into the source directory. or alternatively (also from within the scikit-learn source folder): pip install . Packages installed with the python setup.py install command cannot be uninstalled nor upgraded by pip later.

Can we install scikit-learn using pip?

pip install scikit-learn Instead, consider installing Python libraries from source code. The simplest way to build scikit-learn from source is to use the ActiveState Platform to automatically build and package it for Windows, Mac or Linux.


1 Answers

This seems to be a problem with sklearn, not understanding that the atlas package now comes as a shared .so file, instead of multiple ones. You can see the problem at this github issue.

My solution was the last one offered: simply create a link:

ln -s /usr/lib64/atlas/libsatlas.so /usr/lib64/atlas/libcblas.so

and try again.

like image 123
ptau Avatar answered Oct 21 '22 04:10

ptau