antoine
antoine

Reputation: 21

ModuleNotFoundError: No module named 'nets' (TensorFlow)

Here is my error :

File "C:\Program Files\Python36\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py", line 28, in <module>
ModuleNotFoundError: No module named 'nets'

screenshot

I have already change the python path but it doesn't change anything

Upvotes: 1

Views: 8628

Answers (5)

MiRyong Park
MiRyong Park

Reputation: 21

Maybe in a Windows environments, capital code couldn't check differently and differs from linux file system.

It has already BUILD file inside slim folder. Let's move BUILD to BUILD.old, then You can build slim package

c:\foo\bar\models\research> cd slim
c:\foo\bar\models\research\slim> move BUILD BUILD.old
c:\foo\bar\models\research\slim> python setup.py build
c:\foo\bar\models\research\slim> python setup.py install

Upvotes: 2

Draxy07
Draxy07

Reputation: 91

on windows in the C:\tensorflow\models\research\slim directory run python setup.py build python setup.py install

P.S models/research/slim HAS ITS OWN setup.py!!!!!!!!!!!!! use the one specific for slim

Upvotes: 1

zhe
zhe

Reputation: 1

You need to make sure that the tensorflow/models/research/ and slim directories are added to PYTHONPATH (see the installation instructions).

Either run the following

export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim

or add it to the end of your ~/.bashrc so that it gets run automatically whenever you open a new terminal.

Upvotes: 0

helloswift123
helloswift123

Reputation: 163

I met same problem with you, since we are both in Windows Environment. What am I doing is that, I added little codes in the header of model_builder_test.py. import sys sys.path.append("....../tutorial/models/research") sys.path.append("....../tutorial/models/research/slim") ...... import tensorflow as tf from google.protobuf import text_format from object_detection.builders import model_builder ......

Upvotes: 0

Yograj Singh Mandloi
Yograj Singh Mandloi

Reputation: 603

Try to copy nets or slim folder to .....\site-packages\object_detection-0.1-py3.5.egg

See if this solution works.

Upvotes: 0

Related Questions