thorrak/fermentrack

Numpy package

Closed this issue · 9 comments

Hey,

getting an error message when trying to calibrate my iSpindel - The "numpy" python package is not available which is required for calibration.

I have tried install numpy for python and python 3 ( i have pip installed for both) "pip install numpy"

Raspberry Pi OS Lite
Release date: May 7th 2021
Kernel version: 5.10

curl -L install.fermentrack.com | bash

Any ideas?

Cheers

Matt

When did you install Fermentrack? Are you using the Docker-based installation?

I installed it yesterday using the above curl command and above OS

I am also having the same issue.
I installed the Docker-based installation using the same
curl-L install.fermentrack.com | sudo bash
I have been trying to figure it out for 10 to 14 days...

NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
Linux raspberrypi 5.10.60-v7l+ #1449 SMP Wed Aug 25 15:00:44 BST 2021 armv7l GNU/Linux

Any help would be appreciated.

Also having the same issue with NumPy (Tilt calibration points instead of iSpindel).
NumPy is installed, version 1.16.2.

Edit: Tried a manual Python 3 pip install (no wheel) of NumPy 1.19.4, no change.

Digging into this more, running a version check (python3 -c "import numpy; print(numpy.version)") returns the following:

` Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/numpy/core/init.py", line 22, in
from . import multiarray
File "/usr/local/lib/python3.8/site-packages/numpy/core/multiarray.py", line 12, in
from . import overrides
File "/usr/local/lib/python3.8/site-packages/numpy/core/overrides.py", line 7, in
from numpy.core._multiarray_umath import (
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/site-packages/numpy/init.py", line 140, in
from . import core
File "/usr/local/lib/python3.8/site-packages/numpy/core/init.py", line 48, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
`
My previous comment (Trying a manual install of NumPy) isn't applicable, forgot this was running in container now. Current error with missing libopenblas is within the Django container. Reinstalled numpy in container with fermentrack wheel. Installation successful, however the same error occurs when version checking numpy. Appears that OpenBLAS is missing, not sure if this is required for Fermentrack or if it should have been flagged out on install.

I installed it yesterday using the above curl command and above OS

same for me
(ispindel calibrating)

I just now (2021-12-23 16:00 UTC) re-installed fermentack again on raspberry pi 4 with Raspbian 11 (bullseye) installed using the following commands

sudo apt update
sudo apt upgrade
curl -L install.fermentrack.com | bash

However, as above, when I attempt to calibrate, I too get The "numpy" python package is not available which is required for calibration
Is this being looked at? Is this an issue with the docker version of the install? Is there a work-around?
This error pretty much renders the software useless (as far as the ispindel is concerned at least) so a fix or workaround would be really helpful.

I found a solution to make it work for the docker install which is basically to SSH into the container and install the missing lib needed by numpy to work.

SSH into the container :

docker exec -u root -it fermentrack-tools_django_1 /bin/bash

Install the missing library :

apt-get install libopenblas-dev

Then restart the container :

exit
docker restart fermentrack-tools_django_1

If this is not working, it may be because another dependency is missing, int he case you should run the following command (from the container) and analyze the error message.

python
import numpy

Of course this is just a quick fix and this has to be addressed in the codebase at some point, but hopefully this solution can unblock some people here.

Interesting — the containers should currently work with numpy, but getting this added to the containers if it needs to be there should be an easy change. I’ll take a look once I’m somewhere with WiFi.