如何修复“无模块名称:object_objection.box_coders”?

时间:2019-04-17 06:47:07

标签: python

object-detection上的ModuleNotFoundError

  

错误StackTrace

Traceback (most recent call last):
  File "train.py", line 58, in <module>
    from object_detection.builders import model_builder
  File "C:\Program Files\Python37\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 21, in <module>
    from object_detection.builders import box_coder_builder
  File "C:\Program Files\Python37\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\box_coder_builder.py", line 17, in <module>
    from object_detection.box_coders import faster_rcnn_box_coder
ModuleNotFoundError: No module named 'object_detection.box_coders'

1 个答案:

答案 0 :(得分:1)

似乎您的包裹已损坏。尝试重新安装它:

pip install --force-reinstall object-detection

另请参阅文档的要求:

Requires: Python >=3.5, !=3.7.*

它仅适用于Python> = 3.5,但不适用于Python 3.7。*,因此不适用于您当前的Python。考虑安装Python 3.5,应该没问题。