CCL icon indicating copy to clipboard operation
CCL copied to clipboard

ImportError with libcblas on macOS

Open JingZhaoQi opened this issue 1 year ago • 6 comments

When attempting to import the pyccl library after installation, I encounter the following ImportError related to the libcblas library not being loaded:

import pyccl

File ~/anaconda3/lib/python3.11/site-packages/pyccl/init.py:22 from . import ccllib as lib

File ~/anaconda3/lib/python3.11/site-packages/pyccl/ccllib.py:16 from . import _ccllib

ImportError: dlopen(/Users/qijingzhao/anaconda3/lib/python3.11/site-packages/pyccl/_ccllib.so, 0x0002): Library not loaded: @rpath/libcblas.3.dylib Referenced from: <85EFA90A-BE88-35A7-AD9E-F20432CD4AFA> /Users/qijingzhao/anaconda3/lib/libgsl.25.dylib Reason: tried: '/Users/qijingzhao/anaconda3/lib/libcblas.3.dylib' (no such file), '/Users/qijingzhao/anaconda3/lib/python3.11/site-packages/pyccl/../../../libcblas.3.dylib' (no such file), '/Users/qijingzhao/anaconda3/lib/python3.11/site-packages/pyccl/../../../libcblas.3.dylib' (no such file), '/Users/qijingzhao/anaconda3/bin/../lib/libcblas.3.dylib' (no such file), '/Users/qijingzhao/anaconda3/bin/../lib/libcblas.3.dylib' (no such file), '/usr/local/lib/libcblas.3.dylib' (no such file), '/usr/lib/libcblas.3.dylib' (no such file, not in dyld cache)

I would greatly appreciate any guidance on resolving this issue.

JingZhaoQi avatar Mar 06 '24 04:03 JingZhaoQi

Looks like some dependency is missing, maybe try to install conda install conda-forge::libcblas.

zdu863 avatar Mar 06 '24 17:03 zdu863

Looks like some dependency is missing, maybe try to install conda install conda-forge::libcblas.

Thank you for your reply, but it's still not working.

JingZhaoQi avatar Mar 07 '24 05:03 JingZhaoQi

I have the same issue - please can you let me know how you resolved this?

ghost avatar May 22 '24 08:05 ghost

I have the same issue - please can you let me know how you resolved this?

Installing cmake and swig might solve this problem pip install swig

JingZhaoQi avatar May 29 '24 08:05 JingZhaoQi

I have the same issue - please can you let me know how you resolved this?

Installing cmake and swig might solve this problem pip install swig

Thank you for your reply. Unfortunately I'm still getting the same error.

ghost avatar May 30 '24 10:05 ghost