1

after following the instruction at: https://github.com/mathildor/DeepLab-v3/blob/master/g3doc/installation.md

and:

echo %PYTHONPATH%

$PYTHONPATH: 'C:\.....\tensorflow\models\research' : 'C:\.....\tensorflow\models\research\slim' "

and also after following this thread: https://github.com/tensorflow/models/issues/4364

I'm still getting the same error when trying to run the test file:

python deeplab/model_test.py

Traceback (most recent call last):
  File "deeplab/model_test.py", line 21, in <module>
    from deeplab import common
ModuleNotFoundError: No module named 'deeplab' 

I`m stuck on this for a couple of day now, does anyone had the same problem?

CDJB
  • 14,043
  • 5
  • 29
  • 55

2 Answers2

0

Make sure you are in models/research directory, and that slim and deeplab folders are both inside that directory. Then, run the following code:

export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim

You do not need to change anything in the above line. Then, run the train.py again and you should be fine.

behnam
  • 25
  • 4
  • But for the particular error: ModuleNotFoundError: No module named 'deeplab' , the correct export is to do " export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/deeplab" from the parent folder (research here) which contains both slim and deeplab folder – Manas Dec 03 '19 at 00:12
0

on windows is SET PYTHONPATH=%cd%;%cd%\slim

Rujun Long
  • 11
  • 1