0

I am not able to make sklearn function on my ubuntu 12.04 box. This is the error that I am getting. I am not sure how to get around it?

from sklearn.manifold import TSNE

# gives the below error
ImportError: libatlas.so.3gf: cannot open shared object file: No such file or directory

Here is the output of ls /usr/lib/atlas-base/ enter image description here

pg2455
  • 5,039
  • 14
  • 51
  • 78
  • Can you please provide a more specific example of what causes this error? Is it just importing sklearn in a python script? – rabbit Sep 25 '15 at 18:38
  • updated...sorry I should have done it before. – pg2455 Sep 25 '15 at 18:43
  • This might be an issue with scipy/numpy & your system's BLAS library. Can you run the following? `import scipy; scipy.__config__.show()` – rabbit Sep 25 '15 at 18:54
  • unfortunately, it says: `ImportError: cannot import name scimath`. Something is seriously messed up in my system – pg2455 Sep 25 '15 at 18:55
  • Did you actively install scipy/numpy/etc? If so, how did you do it? – rabbit Sep 25 '15 at 19:00
  • I used pip to install scipy and numpy. Although, while installing tsne as I was doing here: `https://github.com/danielfrg/tsne` I came across similar SO question and tried this `sudo apt-get --purge remove libatlas3gf-base && sudo apt-get install libatlas-base-dev` after which things started getting messier. – pg2455 Sep 25 '15 at 19:09
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/90646/discussion-between-nbartley-and-mousecoder). – rabbit Sep 25 '15 at 19:13

1 Answers1

0

Atlas does not seem to be the recommended library. OpenBlas is the recommended library. If Numpy is properly configured everything will work easily.

Link existing Numpy to Libraries: Link ATLAS/MKL to an installed Numpy Compile Numpy with OpenBlas: Compiling numpy with OpenBLAS integration

So, in any such problem uninstall existing numpy and try above two links. Everything will work fine. Installation using 2nd link is the best option. Do it once and then never worry about it.

Community
  • 1
  • 1
pg2455
  • 5,039
  • 14
  • 51
  • 78