open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.59k stars 9.46k forks source link

mmdet/core/bbox/bbox.so: undefined symbol: _Py_ZeroStruct #5380

Closed SamMohel closed 3 years ago

SamMohel commented 3 years ago

i got this error

from .bbox import bbox_overlaps_cython I importError: /mmdet/core/bbox/bbox.so: undefined symbol: _Py_ZeroStruct

RangiLyu commented 3 years ago

It usually because that the python version you are running is different from the python version you used to compile or setup. BTW, can you follow the issue template to provide more details?

SamMohel commented 3 years ago

Thanks for replying. How can I make it one version ? And excuse me what do you mean by follow the issue template ? do you mean that

Traceback (most recent call last): File "train.py", line 7, in from mmdet.datasets import get_dataset File "/path/mmdet/datasets/init.py", line 1, in from .coco import CocoDataset File "/path/mmdet/datasets/coco.py", line 4, in from .custom import CustomDataset File "/path/mmdet/datasets/custom.py", line 12, in from .extra_aug import ExtraAugmentation File "/path/mmdet/datasets/extra_aug.py", line 5, in from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps File "/path/mmdet/core/init.py", line 1, in from .anchor import * # noqa: F401, F403 File "/path/mmdet/core/anchor/init.py", line 2, in from .anchor_target import anchor_target, anchor_inside_flags File "/path/mmdet/core/anchor/anchor_target.py", line 3, in from ..bbox import assign_and_sample, build_assigner, PseudoSampler, bbox2delta File "/path/mmdet/core/bbox/init.py", line 1, in from .bbox import bbox_overlaps_cython ImportError: /path/mmdet/core/bbox/bbox.so: undefined symbol: _Py_ZeroStruct

RangiLyu commented 3 years ago

Just make sure the version of python you used during installation is the same as the one you run train.py. Or try to run python setup.py develop to setup mmdet again.

SamMohel commented 3 years ago

i solved it but another error appeared Traceback (most recent call last): File "train.py", line 7, in <module> from mmdet.datasets import get_dataset File "/path/mmdet/datasets/__init__.py", line 1, in <module> from .coco import CocoDataset File "/path/mmdet/datasets/coco.py", line 4, in <module> from .custom import CustomDataset File "/path/mmdet/datasets/custom.py", line 12, in <module> from .extra_aug import ExtraAugmentation File "/path/mmdet/datasets/extra_aug.py", line 5, in <module> from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps File "/path/mmdet/core/__init__.py", line 1, in <module> from .anchor import * # noqa: F401, F403 File "/path/mmdet/core/anchor/__init__.py", line 2, in <module> from .anchor_target import anchor_target, anchor_inside_flags File "/path/mmdet/core/anchor/anchor_target.py", line 3, in <module> from ..bbox import assign_and_sample, build_assigner, PseudoSampler, bbox2delta File "/path/mmdet/core/bbox/__init__.py", line 1, in <module> from .bbox import bbox_overlaps_cython ModuleNotFoundError: No module named 'mmdet.core.bbox.bbox'

RangiLyu commented 3 years ago

Which version of mmdet are you using? The anchor_target.py has already removed more than one year ago.

SamMohel commented 3 years ago

i re install mmdetection from scratch and error disappeared but got another open i posted here https://github.com/open-mmlab/mmdetection/issues/5365