I got this error ModuleNotFoundError: No module named 'nets' (Tensorflow)

…衆ロ難τιáo~ 提交于 2019-12-23 03:14:46

问题


I was trying to run tensorflow model and I was using Python 3.6 with PyCharm (pip). I got this error:

Use the retry module or similar alternatives.
Traceback (most recent call last):
  File "/Users/erdogan/Desktop/tens/model/research/object_detection/builders/model_builder_test.py", line 21, in <module>
    from object_detection.builders import model_builder
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/object_detection-0.1-py3.6.egg/object_detection/builders/model_builder.py", line 30, in <module>
    from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/object_detection-0.1-py3.6.egg/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py", line 28, in <module>
    from nets import inception_resnet_v2
ModuleNotFoundError: No module named 'nets'

I have used this:

Vural-MacBook-Pro:research erdogan$ export PYTHONPATH=/Users/erdogan/Desktop/tens/model/research/slim:$PYTHONPAT

But it did not work. I have also checked my path:

Vural-MacBook-Pro:research erdogan$ echo $PYTHONPATH

I got this:

/Users/erdogan/Desktop/tens/model/research/slim:

回答1:


Try to copy the nets folder from slim to the installation directory. Ref



来源:https://stackoverflow.com/questions/49724650/i-got-this-error-modulenotfounderror-no-module-named-nets-tensorflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!