facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

Caffe2 test fails outside of build directory. Success inside of build. #1351

Open karlybirdkarly opened 7 years ago

karlybirdkarly commented 7 years ago

I haven't used anaconda, I installed everything with pip and brew only, so this script suggested on the website doesn't work:

sudo install_name_tool -change libpython2.7.dylib ~/anaconda/lib/libpython2.7.dylib /usr/local/caffe2/python/caffe2_pybind11_state.so

I am sure this issue is related paths.

Here is the error message when I do: $ python -c 'from caffe2.python import core'

WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu CRITICAL:root:Cannot load caffe2.python. Error: dlopen(/usr/local/caffe2/python/caffe2_pybind11_state.so, 10): Library not loaded: @rpath/libcaffe2.dylib Referenced from: /usr/local/caffe2/python/caffe2_pybind11_state.so Reason: image not found

sunstarchan commented 7 years ago

I meet this issue too