Latest versions of scipy, numpy and sklearn are installed. Calling the below code
from sklearn import preprocessing
from sklearn.preprocessing import LabelEncoder
causes the following message:
ImportError Traceback (most recent call last)
/var/folders/hn/jxm_2f5n1xz5scjw_l_39vzh0000gn/T/ipykernel_1456/1314298831.py in
----> 1 from sklearn import preprocessing
2 from sklearn.preprocessing import LabelEncoder
/opt/anaconda3/lib/python3.9/site-packages/sklearn/init.py in
80 from . import _distributor_init # noqa: F401
81 from . import __check_build # noqa: F401
—> 82 from .base import clone
83 from .utils._show_versions import show_versions
84
/opt/anaconda3/lib/python3.9/site-packages/sklearn/base.py in
15 from . import version
16 from ._config import get_config
—> 17 from .utils import _IS_32BIT
18 from .utils._set_output import _SetOutputMixin
19 from .utils._tags import (
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/init.py in
15 import warnings
16 import numpy as np
—> 17 from scipy.sparse import issparse
18
19 from .murmurhash import murmurhash3_32
/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/init.py in
281
282 # For backward compatibility with v0.19.
→ 283 from . import csgraph
284
285 # Deprecated namespaces, to be removed in v2.0.0
/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/csgraph/init.py in
180 ‘NegativeCycleError’]
181
→ 182 from ._laplacian import laplacian
183 from ._shortest_path import (
184 shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson,
/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/csgraph/_laplacian.py in
5 import numpy as np
6 from scipy.sparse import isspmatrix
----> 7 from scipy.sparse.linalg import LinearOperator
8
9
/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/linalg/init.py in
121 from ._dsolve import *
122 from ._interface import *
→ 123 from ._eigen import *
124 from ._matfuncs import *
125 from ._onenormest import *
/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/linalg/_eigen/init.py in
7
8 “”"
----> 9 from .arpack import *
10 from .lobpcg import *
11 from ._svds import svds
/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/linalg/_eigen/arpack/init.py in
18
19 “”"
—> 20 from .arpack import *
/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/linalg/_eigen/arpack/arpack.py in
40 all = [‘eigs’, ‘eigsh’, ‘ArpackError’, ‘ArpackNoConvergence’]
41
—> 42 from . import _arpack
43 arpack_int = _arpack.timing.nbx.dtype
44
ImportError: dlopen(/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/linalg/_eigen/arpack/_arpack.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libquadmath.0.dylib
Referenced from: <99DF54F4-B8F6-3977-BEB8-DE81BE05BDF7> /opt/anaconda3/lib/libgfortran.5.dylib
Reason: tried: ‘/opt/anaconda3/lib/libquadmath.0.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/opt/anaconda3/lib/libquadmath.0.dylib’ (no such file), ‘/opt/anaconda3/lib/libquadmath.0.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/opt/anaconda3/lib/libquadmath.0.dylib’ (no such file), ‘/opt/anaconda3/lib/libquadmath.0.dylib’ (no such file), ‘/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/linalg/_eigen/arpack/…/…/…/…/…/…/…/libquadmath.0.dylib’ (no such file), ‘/opt/anaconda3/lib/python3.9/site-packages/scipy/sparse/linalg/_eigen/arpack/…/…/…/…/…/…/…/libquadmath.0.dylib’ (no such file), ‘/opt/anaconda3/bin/…/lib/libquadmath.0.dylib’ (no such file), ‘/opt/anaconda3/bin/…/lib/libquadmath.0.dylib’ (no such file), ‘/usr/local/lib/libquadmath.0.dylib’ (no such file), ‘/usr/lib/libquadmath.0.dylib’ (no such file, not in dyld cache)
I have re-installed Anaconda several times… Doesn’t work.
The file libquadmath.0.dylib is in directory…
Could you please help!