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

libf77blas.so.3: cannot open shared file: no such file or directory #14772

Closed
JamesTCameron opened this issue Oct 24, 2019 · 15 comments
Closed
Labels
32 - Installation Problems installing or compiling NumPy

Comments

@JamesTCameron
Copy link

JamesTCameron commented Oct 24, 2019

-Operating System: Raspbian Stretch (9)
-How Python was installed: Python 3.5.3 is default Python3 on Stretch
-How numpy was installed: pip installed under virtual environment (version 1.17.3)
-Python2.7 is also installed by default

I want to use OpenVINO's dldt library for inference on raspberry pi 3. I've run into issues before but following some instructions here, I built the most recent version of the library using cmake for native compilation under raspbian stretch (It took hours).

I first noticed the error when running their model optimizer python code:

$ python3 <dldt_dir>/model-optimizer/mo.py --input_model [input model] --data_type [data type] --output_dir [output_dir]
Traceback (most recent call last):
  File "/home/pi/.virtualenvs/openvino/lib/python3.5/site-packages/numpy/core/__init__.py", line 17, in <module>
    from . import multiarray
  File "/home/pi/.virtualenvs/openvino/lib/python3.5/site-packages/numpy/core/multiarray.py", line 14, in <module>
    from . import overrides
  File "/home/pi/.virtualenvs/openvino/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 "<stdin>", line 1, in <module>
  File "/home/pi/.virtualenvs/openvino/lib/python3.5/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/home/pi/.virtualenvs/openvino/lib/python3.5/site-packages/numpy/core/__init__.py", line 47, 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.5 from "/home/pi/.virtualenvs/openvino/bin/python",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.17.3" 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

However I quickly found out that this problem persists when importing numpy from Python3

>>> import numpy as np
[...]
Importing the numpy c-extensions failed.
[...]
Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory

I've tried uninstalling and reinstalling numpy. I've made sure that numpy worked in Python3 before installing the dldt library.
Please help. You're my only hope.

@mattip
Copy link
Member

mattip commented Nov 4, 2019

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

sudo apt-get install libatlas-base-dev

@rgommers rgommers added the 32 - Installation Problems installing or compiling NumPy label Dec 3, 2019
@mattip
Copy link
Member

mattip commented Dec 8, 2019

Closing, in the hopes that the suggested solution solved the problem and the original reporter now can use NumPy. If that is not the case, please reopen with more information or open a new issue explaining why this is not a duplicate

@mattip mattip closed this as completed Dec 8, 2019
@Mausy5043
Copy link

Ran into the same problem today.

Came here to confirm that the proposed solution (sudo apt-get install libatlas-base-dev) worked for me.

Thanks!

@citypilgrim
Copy link

Me too, the solution works. Thank you so much!

@dave-code-ruiz
Copy link

work for me too, thanks

@dretful
Copy link

dretful commented Mar 10, 2020

fixed for me too.

@sanghvibk
Copy link

sudo apt-get install libatlas-base-dev worked for me too. Thanks.

@kalety
Copy link

kalety commented May 23, 2020

Work!

@scign
Copy link

scign commented Jun 3, 2020

Can someone explain why installing this additional package works?

@mattip
Copy link
Member

mattip commented Jun 3, 2020

NumPy uses OpenBLAS to do its heavy linalg work, that means NumPy calls out into a shared object provided by a third party package. The official NumPy wheels on PyPI incorporate that other package into the wheel and ship the whole thing together. The wheels provided by the https://www.piwheels.org people do not: they depend on you installing the OpenBLAS package separately. So if you get NumPy from them, you need to install the package.

@Mambela
Copy link

Mambela commented Jun 10, 2020

I am here confirm that sudo apt-get install libatlas-base-dev worked for me as well. Thank you !

@yr-github
Copy link

NumPy uses OpenBLAS to do its heavy linalg work, that means NumPy calls out into a shared object provided by a third party package. The official NumPy wheels on PyPI incorporate that other package into the wheel and ship the whole thing together. The wheels provided by the https://www.piwheels.org people do not: they depend on you installing the OpenBLAS package separately. So if you get NumPy from them, you need to install the package.

thanks

@terziyski
Copy link

I can confirm, that worked for me as well.

@LongToeBoy
Copy link

worked for me as well. thanks

@SWoto
Copy link

SWoto commented Jun 29, 2020

worked for me too, thanks!

@numpy numpy locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
32 - Installation Problems installing or compiling NumPy
Projects
None yet
Development

No branches or pull requests