개발/Python

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

강서버 2023. 5. 4. 05:17
728x90
반응형

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

- Solutions :

$ sudo apt install libatlas-base-dev

 

 

gangserver@raspberrypi:~/devel/pydev $ python BreamAndSmelt.py
Traceback (most recent call last):
  File "/home/gangserver/devel/pydev/BreamAndSmelt.py", line 35, in <module>
    from sklearn.neighbors import KNeighborsClassifier
  File "/usr/local/lib/python3.9/dist-packages/sklearn/__init__.py", line 82, in <module>
    from .base import clone
  File "/usr/local/lib/python3.9/dist-packages/sklearn/base.py", line 17, in <module>
    from .utils import _IS_32BIT
  File "/usr/local/lib/python3.9/dist-packages/sklearn/utils/__init__.py", line 25, in <module>
    from .fixes import parse_version, threadpool_info
  File "/usr/local/lib/python3.9/dist-packages/sklearn/utils/fixes.py", line 19, in <module>
    import scipy.stats
  File "/usr/local/lib/python3.9/dist-packages/scipy/stats/__init__.py", line 453, in <module>
    from ._stats_py import *
  File "/usr/local/lib/python3.9/dist-packages/scipy/stats/_stats_py.py", line 38, in <module>
    from scipy.spatial.distance import cdist
  File "/usr/local/lib/python3.9/dist-packages/scipy/spatial/__init__.py", line 104, in <module>
    from ._qhull import *
ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory


gangserver@raspberrypi:~/devel/pydev $ sudo apt install libatlas-base-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libatlas3-base
Suggested packages:
  libatlas-doc liblapack-doc
The following NEW packages will be installed:
  libatlas-base-dev libatlas3-base
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,055 kB of archives.
After this operation, 26.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libatlas3-base armhf 3.10.3-10+rpi1 [2,454 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libatlas-base-dev armhf 3.10.3-10+rpi1 [2,601 kB]
Fetched 5,055 kB in 2s (2,410 kB/s)          
Selecting previously unselected package libatlas3-base:armhf.
(Reading database ... 113849 files and directories currently installed.)
Preparing to unpack .../libatlas3-base_3.10.3-10+rpi1_armhf.deb ...
Unpacking libatlas3-base:armhf (3.10.3-10+rpi1) ...
Selecting previously unselected package libatlas-base-dev:armhf.
Preparing to unpack .../libatlas-base-dev_3.10.3-10+rpi1_armhf.deb ...
Unpacking libatlas-base-dev:armhf (3.10.3-10+rpi1) ...
Setting up libatlas3-base:armhf (3.10.3-10+rpi1) ...
update-alternatives: using /usr/lib/arm-linux-gnueabihf/atlas/libblas.so.3 to pr
ovide /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabih
f) in auto mode
update-alternatives: using /usr/lib/arm-linux-gnueabihf/atlas/liblapack.so.3 to 
provide /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gn
ueabihf) in auto mode
Setting up libatlas-base-dev:armhf (3.10.3-10+rpi1) ...
update-alternatives: using /usr/lib/arm-linux-gnueabihf/atlas/libblas.so to prov
ide /usr/lib/arm-linux-gnueabihf/libblas.so (libblas.so-arm-linux-gnueabihf) in 
auto mode
update-alternatives: using /usr/lib/arm-linux-gnueabihf/atlas/liblapack.so to pr
ovide /usr/lib/arm-linux-gnueabihf/liblapack.so (liblapack.so-arm-linux-gnueabih
f) in auto mode
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ...

 

gangserver@raspberrypi:~/devel/pydev $ python BreamAndSmelt.py
1.0
[1]

 

 

참조 : https://github.com/nschloe/stressberry/issues/27

 

ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory · Issue #27 · nschloe/stressberry

Hi there! I tried installing and running as you suggested, on RPi 3B+ on the latest distro. I got the following error: Traceback (most recent call last): File "/home/pi/.local/lib/python3.5/site-pa...

github.com

 

728x90
반응형