ラズパイでnumpyをインストールしたのにインポートできません。
次の写真のようにnumpyのインストールには成功しています。
しかし実行しようとすると以下のようなエラーが出てしまい実行できません。
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/numpy/core/init.py", line 22, in <module>
from . import multiarray
File "/usr/local/lib/python3.7/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/usr/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 "test.py", line 4, in <module>
from numpy.ctypeslib import ndpointer
File "/usr/local/lib/python3.7/site-packages/numpy/init.py", line 140, in <module>
from . import core
File "/usr/local/lib/python3.7/site-packages/numpy/core/init.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
- The Python version is: Python3.7 from "/usr/local/bin/python3"
- The NumPy version is: "1.19.2"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory
そしてエラー文に記載されているサイトhttps://numpy.org/devdocs/user/troubleshooting-importerror.html
に書かれている方法を試した結果次の写真のようになりました。
しかし依然として実行しようとすると
ModuleNotFoundError: No module named 'numpy'
とエラーが出てしまい実行できません。
解決策と考えられる原因を教えてください。
よろしくお願いいたします。