我收到此错误ModuleNotFoundError:没有名为'nets'的模块(Tensorflow)

时间:2018-04-09 02:08:14

标签: tensorflow module path install

我试图运行tensorflow模型,我使用Python 3.6和PyCharm(pip)。我收到了这个错误:

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'

我用过这个:

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

但它没有用。我也检查了我的路径:

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

我明白了:

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

1 个答案:

答案 0 :(得分:0)

尝试将nets文件夹从slim复制到安装目录。 Ref