2

I'm running Linaro Debian Stretch on a Tinkerboard and I can't seem to be able to get numpy on Python3 to see any installed BLAS/LAPACK resources.

Running np.__config__.show() under python3 gives NOT AVAILABLE for every single entry.

I've installed the BLAS/LAPACK via sudo apt-get install libblas-dev liblapack-dev, and python3-numpy and python3-scipy via apt-get as well. Numpy and scipy both run perfectly fine. I've also installed ATLAS and OpenBLAS without luck, and have tried manual compilation of OpenBLAS and numpy too. Nothing changes the output of np.__config__.show().

Python2, however, shows that these resources are installed.

How can I get Python3 to see these resources too?

Projectile Fish
  • 935
  • 3
  • 9
  • 26
  • Which Debian version is this? – abarnert Aug 24 '18 at 23:35
  • Downloaded from the tinkerboard website: https://tinkerboarding.co.uk/forum/thread-69.html 20180622-tinker-board-linaro-stretch-alip-v2.0.7.img.zip – Projectile Fish Aug 24 '18 at 23:36
  • I vaguely remember that at one point, `python-numpy` and `python3-numpy` depended on different versions of BLAS for some reason, so you had to install `libblas` and also the backward-compat `libblas2`, or something like that, if you wanted both of them to use BLAS. – abarnert Aug 24 '18 at 23:38
  • OK, so the version is Stretch. You should probably [edit] that into your question. – abarnert Aug 24 '18 at 23:39

1 Answers1

0

If anyone's interested in the answer, I managed to finally get OpenBLAS recognized in numpy, and received a decent speed boost.

To do it you must first uninstall python3-numpy and any numpy installed via pip3. Then manually compile OpenBLAS and numpy as explained in Compiling numpy with OpenBLAS integration.

Installing the default packages via apt-get or pip apparently doesn't seem to link in any BLAS library by default, at least not on the TinkerBoard Linaro OS...

Projectile Fish
  • 935
  • 3
  • 9
  • 26