Cannot install Scroll pHAT HD python library using pip3

Just setting up a new Pi zero with scroll pHAT HD. When I try to install the pHAT HD python library using pip3 into either a virtual python environment (using virtualenv) or even into the global python3 (sudo pip3), it seems to install, but there is something wrong with the “numpy” package. It refuses to import at run time. The error I get is in the screen grab below. This is just by running the python interpreter and typing “import numpy”

When pip3 is installing scrollphathd, I see:
Using cached

The good news is things work fine when I use the apt-get install method to install the library, noting that it is installed into the global python3, and I don’t think it can be installed into a virutal environment:
sudo apt-get install python3-scrollphathd

I notice that the apt-get installs an earlier version of numpy v1.12.1 whereas pip3 installs numpy v1.14.3.

Any idea what is going on here with pip3 and numpy? I’d really like the scrollphathd library to be in my virtual environment so would be good to get the pip3 install method working.

Looks like numpy has a dynamic dependency on a system package.

You could try: sudo apt-get install libatlas-base-dev

It’s possible the apt version of numpy either doesn’t use the accelerated ATLAS libraries, or compiles them in, or an earlier/later version is supplied instead.