Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError with libcblas on macOS #1163

Open
JingZhaoQi opened this issue Mar 6, 2024 · 6 comments
Open

ImportError with libcblas on macOS #1163

JingZhaoQi opened this issue Mar 6, 2024 · 6 comments

Comments

@JingZhaoQi
Copy link

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.

@zdu863
Copy link
Contributor

zdu863 commented Mar 6, 2024

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

@JingZhaoQi
Copy link
Author

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.

@ghost
Copy link

ghost commented May 22, 2024

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

@JingZhaoQi
Copy link
Author

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

@ghost
Copy link

ghost commented May 30, 2024

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.

@damonge
Copy link
Collaborator

damonge commented Oct 22, 2024

We did have some success with this same issue by first installing libcblas (conda install -c conda-forge libcblas) and then installing pyccl (conda install -c conda-forge pyccl). It may be worth ensuring pyccl is completely uninstalled before trying though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants