ImportError: cannot import name ‘_C‘ from ‘detectron2‘

宗翔宇
2023-12-01

将detectron2/detectron2中的整个detectron2删除即可,因为已经安装过了,用安装好的就行了。


Traceback (most recent call last):
  File "register_dataset.py", line 69, in <module>
    from detectron2 import model_zoo
  File "/10t/lvying/detectron2/detectron2/model_zoo/__init__.py", line 8, in <module>
    from .model_zoo import get, get_config_file, get_checkpoint_url, get_config
  File "/10t/lvying/detectron2/detectron2/model_zoo/model_zoo.py", line 9, in <module>
    from detectron2.modeling import build_model
  File "/10t/lvying/detectron2/detectron2/modeling/__init__.py", line 2, in <module>
    from detectron2.layers import ShapeSpec
  File "/10t/lvying/detectron2/detectron2/layers/__init__.py", line 3, in <module>
    from .deform_conv import DeformConv, ModulatedDeformConv
  File "/10t/lvying/detectron2/detectron2/layers/deform_conv.py", line 11, in <module>
    from detectron2 import _C
ImportError: cannot import name '_C' from 'detectron2' (/10t/lvying/detectron2/detectron2/__init__.py)

 

 

 类似资料:

相关阅读

相关文章

相关问答