Troubles installing Matplotlib on Nano with Python 3.7/3.8 (and a virtual env)

And, I’ve solved the problem after several days of pulling my hair out. It turns out that it was all related to the NumPy issue described here… Illegal instruction (core dumped) on import for numpy 1.19.5 on ARM64 · Issue #18131 · numpy/numpy · GitHub and here… " Illegal instruction (core dumped)" Xavier

When running with Python 3.7, NumPy 1.19.5 was being installed and it appears that there is an issue with OpenBLAS that can be solved by either exporting OPENBLAS_CORETYPE=ARMV8 before running python or simply installing NumPy 1.19.4 instead. I chose the latter. Here’s what I’ve now done.

python3.7 -m venv vRMS
source ~/vRMS/bin/activate
pip install --upgrade pip setuptools wheel
pip install numpy==1.19.4
pip install matplotlib

Hopefully this will help out anyone else that is facing the same problem.

11 Likes