我收到此错误ModuleNotFoundError:没有名为"nets"的模块(Tensorflow) [英] I got this error ModuleNotFoundError: No module named 'nets' (Tensorflow)

查看:1037
本文介绍了我收到此错误ModuleNotFoundError:没有名为"nets"的模块(Tensorflow)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行tensorflow模型,并且我将Python 3.6与PyCharm(pip)结合使用.我收到此错误:

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'

我用过这个:

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

我知道了:

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

推荐答案

尝试将nets文件夹从slim复制到安装目录. 参考

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

这篇关于我收到此错误ModuleNotFoundError:没有名为"nets"的模块(Tensorflow)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆