尝试安装Scikit-learn在蒙特里Macbook Pro M1。似乎安装确定,但当我运行eg
import sklearn
我得到了错误,
ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/scipy/linalg/_fblas.cpython-39-darwin.so, 0x0002): Library not loaded: '/opt/homebrew/opt/gcc/lib/gcc/11/libgfortran.5.dylib'
Referenced from: '/opt/homebrew/lib/python3.9/site-packages/scipy/linalg/_fblas.cpython-39-darwin.so'
Reason: tried: '/opt/homebrew/opt/gcc/lib/gcc/11/libgfortran.5.dylib' (no such file), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file)
我确实有libgfortran.5.dylb,
locate libgfortran.5.dylib ✔ 5 06:15:39 780 Mbps
/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/12/libgfortran.5.dylib
/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/libgfortran.5.dylib
/opt/homebrew/lib/python3.10/site-packages/numpy/.dylibs/libgfortran.5.dylib
/usr/local/Cellar/gcc/11.1.0/lib/gcc/11/libgfortran.5.dylib
我有一个路径问题吗?。搜索周围我看到一些旧的解决方案链接相关的库。我该怎么做?
1条答案
按热度按时间vjhs03f71#
这一招奏效了。)