OSError: /usr/local/lib/libcaffe2_detectron_ops_gpu.so: undefined symbol: #502
Comments
Same problems here, I tried add PYTHONPATH, but it didn't help.. |
same issue, have you solved? |
When I use source code to make and install caffe2 following the official instruction, such error disappear. |
Hi all, have you verified your Caffe2 installation by running one of Caffe2 tests? (e.g. this one). Also, are you using Caffe2 installed with Anaconda? |
@ir413 I used source code to make and install Caffe2 followed official instruction, and I also tested caffe2 installation as requested, but I still get this error. |
I guess don't use the anaconda caffe2. Use this one https://github.com/pytorch/pytorch/tree/master/caffe2 |
I used the instructions in here, and did not get it to work: https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile |
Hi Selin, just don't use conda to install caffe2. Get it from https://github.com/pytorch/pytorch/tree/master/caffe2. There are some opencv issues if you use conda |
That makes sense. I started on the path of installing caffe2 in a different conda environment with these instructions: https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile But now this is the error I am getting when the cmake is run at the very end: |
@BanuSelinTosun
So I think you can try again using these instructions https://caffe2.ai/docs/getting-started.html?platform=mac&configuration=compile#anaconda-install-path |
@gadcam Thanks, that was my second approach on the list. Though, I am using Ubuntu, not Mac. Or does Mac Page mean something else? 😃 I am running this: The caffe2 installation looks good and passes the test. However, the detectron test is still failing: |
I have met the same problem. And I solve the problem by rename this 'libcaffe2_detectron_ops_gpu.so' file in the following path 'OSError: /usr/local/lib/libcaffe2_detectron_ops_gpu.so'. Since it should reference 'pytorch/build/lib/libcaffe2_detectron_ops_gpu.so' which is under your caffe2 build path. |
hi! @MonkeyNi how to rename 'libcaffe2_detectron_ops_gpu.so'? I can not understand it. could you please help me? thanks! |
well, when I install the new caffe2, and run
I used to install caffe2 from source, now I reinstall it. In new caffe2, |
I am not sure if this an alternate way.
I copied the library to the local. |
This problem was caused by different verision of caffe2, and the _CMAKE_INSTALL_PREFIX variable in env.py. Add LD_LIBRARY_PATH and edit the _CMAKE_INSTALL_PREFIX in env.py could solve this problem |
I tried some solutions in issues, like exporting python path, but it didn't work for me.
/home/chopin/anaconda3/envs/caffe2/caffe2/build/caffe2/python to ~/.bashrc and then pip install utils .
I saw somewhere talking about the opencv version. I have 3.3.1 and the required version is 3.4.1. But caffe2 installed through conda (caffe2-cuda9.0-cudnn7) doesn't work with opencv 3.4.1.
Expected results
I was running this line:
python launch.py --cfg configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml --mode test TEST.WEIGHTS pretrained_models/configs/video/2d_best/01_R101_best_hungarian.yaml/model_final.pkl
Actual results
And then I ran into this error:
Traceback (most recent call last):
File "tools/test_net.py", line 33, in
utils.c2.import_detectron_ops()
File "/home/jingweim/DetectAndTrack/lib/utils/c2.py", line 50, in import_detectron_ops
dyndep.InitOpsLibrary(detectron_ops_lib)
File "/home/jingweim/anaconda2/envs/detect_and_track/lib/python2.7/site-packages/caffe2/python/dyndep.py", line 35, in InitOpsLibrary
_init_impl(name)
File "/home/jingweim/anaconda2/envs/detect_and_track/lib/python2.7/site-packages/caffe2/python/dyndep.py", line 48, in _init_impl
ctypes.CDLL(path)
File "/home/jingweim/anaconda2/envs/detect_and_track/lib/python2.7/ctypes/init.py", line 366, in init
self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/libcaffe2_detectron_ops_gpu.so: undefined symbol: _ZN6caffe28TypeMeta2IdINS_6TensorINS_11CUDAContextEEEEENS_11CaffeTypeIdEv
System information
PYTHONPATH
environment variable: /home/jingweim/anaconda2/envs/detect_and_track/include/caffe2/python:/usr/bin/pythonpython --version
output: Python 2.7.15 :: Anaconda custom (64-bit)The text was updated successfully, but these errors were encountered: