question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

-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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

61reactions
mattipcommented, Nov 4, 2019

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

sudo apt-get install libatlas-base-dev
2reactions
mattipcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: libf77blas.so.3: cannot open shared object file
In Raspbian Buster I had to: sudo apt install libatlas-base-dev; sudo pip3 install pybind11 to get pip3 install scipy to succeed.
Read more >
Skimage ImportError: libf77blas.so.3: cannot open shared ...
Skimage ImportError : libf77blas.so.3: cannot open shared object file: No such file or directory skimage ... I try to use raspberry pi 3...
Read more >
Libf77blas missing on Ubuntu - what should I install?
Hi all, When I load a TMVA object I get a missing shared library on my ... libf77blas.so.3: cannot open shared object file:...
Read more >
“libptf77blas.so.3: cannot open shared object file: No such file ...
“libptf77blas.so.3: cannot open shared object file: No such file or directory” Code Answer. OSError: libespeak.so.1: cannot open shared object file: ...
Read more >
Troubleshooting ImportError — NumPy v1.23 Manual
libf77blas.so.3: cannot open shared object file: No such file or directory. The solution will be to either: sudo apt-get install libatlas-base-dev.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found