How to install NumPy on Raspberry Pi

I installed Numpy with pip on Raspberry Pi, but I got the following error.

Check the troubleshooting URL mentioned in the error. https://numpy.org/devdocs/user/troubleshooting-importerror.html

Traceback (most recent call last):
   File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/__init__.py", line 24, in <module>
     from . import multiarray
   File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/multiarray.py", line 14, in <module>
     from . import overrides
   File "/home/pi/.local/lib/python3.5/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 "test.py", line 1, in <module>
     import numpy as np
   File "/home/pi/.local/lib/python3.5/site-packages/numpy/__init__.py", line 142, in <module>
     from . import core
   File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/__init__.py", line 50, in <module>
     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.
 
 We have compiled some common reasons and troubleshooting tips at:
 
     https://numpy.org/devdocs/user/troubleshooting-importerror.html
 
 Please note and check the following:
 
   * The Python version is: Python3.5 from "/usr/bin/python3"
   * The NumPy version is: "1.18.5"
 
 and make sure that they are the versions you expect.
 Please carefully study the documentation linked above for further help.
 
 Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory

There was another way to install NumPy on Raspberry Pi

If you check Troubleshooting, it says that installing with pip is useless.

There are sometimes issues reported on Raspberry Pi setups when installing using pip3 install (or pip install). These will typically mention:

Follow the instructions and run the following command

$ sudo apt-get install libatlas-base-dev
$ pip3 uninstall numpy  # remove previously installed version
$ apt install python3-numpy

After following this step, NumPy can be used with Raspberry Pi.

environment

Recommended Posts

How to install NumPy on Raspberry Pi
How to install mkl numpy
Install OpenCV4 on Raspberry Pi 3
Install TensorFlow 1.15.0 on Raspberry Pi
raspberry pi 4 centos7 install on docker
How to install mysql-connector-python on mac
Install ghoto2 on Raspberry Pi (memo)
How to install graph-tool on macOS
How to install VMware-Tools on Linux
How to install pycrypto on Windows
How to install OpenCV on Mac
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to install Go on Ubuntu
How to install music 21 on windows
How to install aws-session-manager-plugin on Manajro Linux
[Kivy] How to install Kivy on Windows [Python]
Install 64-bit OS (bate) on Raspberry Pi
How to install packages on Alpine Linux
Install docker-compose on 64-bit Raspberry Pi OS
How to install richzhang / colorization on Windows 10
How to install Apache (httpd) on CentOS7
How to install php7.4 on Linux (Ubuntu)
How to install Apache (httpd) on CentOS8
How to install cx_Oracle on macOS Sierra
How to play music (wav / mp3) files on Raspberry Pi python
How to install Python
How to install pip
How to install archlinux
pigpio on Raspberry pi
How to install python
How to install BayesOpt
Install numpy on Marvericks
How to use numpy
How to install Nbextensions
Cython on Raspberry Pi
How to install Prover9
How to operate NumPy
[2020 version] How to install Python3 on AWS EC2
How to install OpenCV on Jetson Nano Python
How to use Raspberry Pi pie camera Python
How to quickly install h5py on Windows 10 [Unofficial]
How to install OpenGM on OSX with macports
How to install Camunda Modeler on Manjaro Linux
[Python] How to install OpenCV on Anaconda [Windows]
How to install / verify graphviz on anaconda / windows10
Connect to MySQL with Python on Raspberry Pi
Introduced python3-OpenCV3 to Raspberry Pi
[2020.8 latest] How to install Python
Install Raspberry Pi OS (Raspbian)
How to install Python [Windows]
Tabpy 1.0 (2020-01 version) How to install
How to use the Raspberry Pi relay module Python
How to install Linux on a 32bit UEFI PC
How to install Git GUI and Gitk on CentOS
I talked to Raspberry Pi
How to register on pypi
[AWS EC2] How to install Maven on Amazon Linux 2
How to install Pelican blog
How to install git on Linux such as EC2
Install pyenv on Raspberry Pi and version control Python