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

Python fails when import caffe, Library not loaded: @rpath/libcaffe.so #3459

Closed
rsxh5 opened this issue Dec 17, 2015 · 2 comments
Closed

Python fails when import caffe, Library not loaded: @rpath/libcaffe.so #3459

rsxh5 opened this issue Dec 17, 2015 · 2 comments

Comments

@rsxh5
Copy link

rsxh5 commented Dec 17, 2015

OSX 10.11.12, cud 7.5, make runtest succeeded.
When I try to import caffe in python, got error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libcaffe.so
  Referenced from: /Users/kiwi/Developer/caffe/distribute/python/caffe/_caffe.so
  Reason: image not found

Already tried:

  1. set DYLD_LIBRARY_PATH
    Not working, and import procedure will pend
  2. check python path in makeconfig file, and my system python & anaconda python have the same version
  3. hdf5 installed via anaconda not brew.
  4. Turned off System Integrity Protection
  5. Tried otool -L caffe/libcaffe.so/test_all.testbin, all linked right to lib*.7.5.dylib
@nunerakesh
Copy link

We have the same problem. We have caffe installed but for some reason it is not being picked up

zfogg added a commit to zfogg/caffe that referenced this issue Feb 1, 2016
Fixed for both OS X and Linux.

This fixes BVLC#3597 and fixes BVLC#3459.
@shelhamer
Copy link
Member

See #3597 (comment) for an identification of the problem and #3696 for the fix.

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

Successfully merging a pull request may close this issue.

3 participants