Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing the numpy c-extensions failed. #15744

Closed
Napan0s opened this issue Mar 11, 2020 · 3 comments
Closed

Importing the numpy c-extensions failed. #15744

Napan0s opened this issue Mar 11, 2020 · 3 comments

Comments

@Napan0s
Copy link

Napan0s commented Mar 11, 2020

Hi everyone,
I've done this many times with no problems at all.
Today i flashed a brand new raspbian lite img with the updated image from the raspberry website, everything was working fine until i decided to work in python with numpy and it gave me this error.
I've tried it both from a file and from a python3 environment in terminal.
Please help me !!

Note:
I've already tried reinstalling the library
I did it by pip3 install numpy

Reproducing code example:

import numpy

Error message:

Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/init.py", line 24, in
from . import multiarray
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in
from . import overrides
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in
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 "", line 1, in
File "/home/pi/.local/lib/python3.7/site-packages/numpy/init.py", line 142, in
from . import core
File "/home/pi/.local/lib/python3.7/site-packages/numpy/core/init.py", line 54, in
raise ImportError(msg)
ImportError:

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

Importing the numpy c-extensions failed.

  • Try uninstalling and reinstalling numpy.

  • If you have already done that, then:

    1. Check that you expected to use Python3.7 from "/usr/bin/python3",
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy version "1.18.1" you're trying to use.
    2. If (1) looks fine, you can open a new issue at
      https://github.com/numpy/numpy/issues. Please include details on:
      • how you installed Python
      • how you installed numpy
      • your operating system
      • whether or not you have multiple versions of Python installed
      • if you built from source, your compiler versions and ideally a build log
  • If you're working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

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

Numpy/Python version information:

Python 3.7.3
Numpy-1.18.1

@mattip
Copy link
Member

mattip commented Mar 11, 2020

Looking at gh-11110, perhaps this would solve the problem?

sudo apt-get install libatlas-base-dev

@mitchba98
Copy link

Worked for me, thanks @mattip

Looking at gh-11110, perhaps this would solve the problem?

sudo apt-get install libatlas-base-dev

@charris charris closed this as completed Mar 11, 2020
@Napan0s
Copy link
Author

Napan0s commented Mar 11, 2020

Worked for me too!!! Thank you so much @mattip, you made my day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants