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

Cannot import numpy due to multiarray problems #15497

Closed
RnoldR opened this issue Feb 3, 2020 · 2 comments
Closed

Cannot import numpy due to multiarray problems #15497

RnoldR opened this issue Feb 3, 2020 · 2 comments
Labels
32 - Installation Problems installing or compiling NumPy

Comments

@RnoldR
Copy link

RnoldR commented Feb 3, 2020

Tried to install pandas on my raspberry pi 3B. This was installed yesterday with debian-buster and fully upgraded. Python version is 3.7.3. When I tried to install pandas (pip3 install pandas) I got the error:

ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.

I found some suggestions which had to do with versioning. Pip3 refused to uninstall. I uninstalled it manually by deleting all references to numpy in site-packages. When I reinstalled with pip3 version 1.18.1 was installed, but the problem with pandas persisted.

I tried "sudo apt install pandas", that installed, but when I tried to import I got the multiarray problem during the import of pandas. I uninstalled numpy with pip3 and installed with apt. Now I cannot import even numpy, the error message being:

ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

plus a suggestion to file this issue.

PATH = /home/arnold/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
PYTHONPATH=<empty>

Error message:

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

numpy: 1.18.1
sys: 3.7.3

@charris
Copy link
Member

charris commented Feb 3, 2020

See #14772

sudo apt-get install libatlas-base-dev

I don't know what to say about what has happened in your attempts to fix the problem.

@charris charris added the 32 - Installation Problems installing or compiling NumPy label Feb 3, 2020
@RnoldR
Copy link
Author

RnoldR commented Feb 3, 2020

Thanks! that worked. I Indeed made some kind of a mess of the (re/de/un)installation. But I noticed that when using apt version 16.2 is installed and pip3 version 18.1. That is, on the raspberry pi.

@RnoldR RnoldR closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
32 - Installation Problems installing or compiling NumPy
Projects
None yet
Development

No branches or pull requests

2 participants