raspi3 as a representative of unix-like, ie linux, macOs
following the readme steps for preparation gives no error messages, at first glance all is ok. But the first run with do_test fails with
(py37_cmp) pi@raspberrypi:~/dev2/cocos-testcmp $ python do_test.py
Traceback (most recent call last):
File "/home/pi/dev2/py37_cmp/lib/python3.7/site-packages/numpy/core/__init__.py", line 22, in <module>
from . import multiarray
File "/home/pi/dev2/py37_cmp/lib/python3.7/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/home/pi/dev2/py37_cmp/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: libf77blas.so.3: 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 "do_test.py", line 39, in <module>
import support.helpers as hl
File "/home/pi/dev2/cocos-testcmp/support/helpers.py", line 14, in <module>
from remembercases.image_comparison import is_full_black
File "/home/pi/dev2/cocos-testcmp/work/remembercases/remembercases/image_comparison.py", line 15, in <module>
import numpy as np
File "/home/pi/dev2/py37_cmp/lib/python3.7/site-packages/numpy/__init__.py", line 140, in <module>
from . import core
File "/home/pi/dev2/py37_cmp/lib/python3.7/site-packages/numpy/core/__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
...
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
At that page
Raspberry Pi
There are sometimes issues reported on Raspberry Pi setups when installing using pip3 install (or pip install). These will typically mention:
libf77blas.so.3: cannot open shared object file: No such file or directory
The solution will be to either:
sudo apt-get install libatlas-base-dev
to install the missing libraries expected by the self-compiled NumPy (ATLAS is a possible provider of linear algebra).
Alternatively use the NumPy provided by Raspbian. In which case run:
Now, looking at the console just before running do_test I see 'Successfully installed cocos-testcmp numpy-1.19.4 pillow-8.0.1'
And in anoter console, not en the environment
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.version
<module 'numpy.version' from '/usr/lib/python3/dist-packages/numpy/version.py'>
>>> numpy.version.version
'1.16.2'
try 1: go into the venv, uninstall numpy, try pip install the same version that the main python3
raspi3 as a representative of unix-like, ie linux, macOs
following the readme steps for preparation gives no error messages, at first glance all is ok. But the first run with do_test fails with
At that page
And in anoter console, not en the environment
And in the conf.py set "numpy": "numpy==1.16.2",
Running do_test again produces the same error
sudo apt-get install libatlas-base-dev
Now do_test goes farther, the error seem unrelated with numpy:
looking into the venv, python's path is wrong, should be /home/pi/dev2/cocos-testcmp/work/pys/3.7.3/bin /bin, no /Scripts
fixed