Maskrcnn-benchmark: ImportError: /maskrcnn-benchmark/maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE

Created on 11 Feb 2019  ยท  5Comments  ยท  Source: facebookresearch/maskrcnn-benchmark

โ“ Questions and Help

I am getting this error, when importing _C.

ImportError: /maskrcnn-benchmark/maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE

This is my machine info.

>>> torch.__version__
'1.0.1.post2'
>>> torch.version.cuda
'10.0.130'
question

Most helpful comment

@ZhangK9509 you'll need to import torch before you execute from maskrcnn_benchmark import _C

All 5 comments

Hi,

You have compiled maskrcnn_benchmark using a different version of PyTorch.
Try rm -rf build/ and then compiling it again with the same version, it should work once you do this.

Also, if this fixes the problem for you, do you mind adding one more entry in the TROUBLESHOOTING section?

I meet the same problem when just try importing.

>>> from maskrcnn_benchmark import _C

But when training the whole project, it is ok with torch 1.0.0, python 3.6 and cuda 9.0.
It seems I should learn more about extension.

@ZhangK9509 you'll need to import torch before you execute from maskrcnn_benchmark import _C

@dannyhung1128 import torch before from maskrcnn_benchmark import _C worked for me, but why?

@dannyhung1128 It is amazing, Can you share how you figure out this problem? Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BelhalK picture BelhalK  ยท  4Comments

jbitton picture jbitton  ยท  4Comments

hadim picture hadim  ยท  4Comments

krumo picture krumo  ยท  3Comments

CF2220160244 picture CF2220160244  ยท  3Comments