I am using the most recent version of Rasperry Pi's OS on a Pi 4 model B. Apparently the version of python that comes with the OS is 3.9. I'm not sure if Numpy comes with it or that I installed it while installing other packages. But when I try to install as a check, the response is that it's 1.24.3. I istalled the most recent 32bit version. Now to the problem, when I run the following line in a python program. (I'm using visual studio just installed as well)

 import numpy as np

I get the following error messages: Exception has occurred: ImportError
Unable to import required dependencies: numpy:


 Importing the numpy C-extensions failed. This error can happen for
 many reasons, often due to issues with your setup or how NumPy was

 We have compiled some common reasons and troubleshooting tips at:


 Please note and check the following:

   * The Python version is: Python3.9 from "/bin/python"
   * The NumPy version is: "1.24.3"

 and make sure that they are the versions you expect.
 Please carefully study the documentation linked above for further help.

Original error was: libcblas.so.3: cannot open shared object file: No such file or directory

I'm not sure how to proceed. Suggestions?

  • Debian provides consistent Python modules against the version of Python it installs. Use them. Study apt install and apt-cache search.
    – joan
    Jun 1, 2023 at 21:10

3 Answers 3


I'm not sure why it caused a problem, but I had installed the 32 bit version of Raspberry Pi. When I installed the 64 bit version, the problem went away.


You should use sudo apt install python3-numpy to install the supported version (which is 1.19.5).

Debian Bookworm (yet to be released) has 1.24.2


Have you tried this solution:

What worked for me (I was missing some dependencies):

pip3 install opencv-python 
sudo apt-get install libcblas-dev
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev 
sudo apt-get install libqtgui4 
sudo apt-get install libqt4-test

It also has a similar error, so you may find soultion there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.