Tensorflow no module named official


I am trying to use the nets from the official mnist directory of tensorflows model repository. On my windows system I receive this error:

Traceback (most recent call last):
  File "C:\Users\ry\Desktop\NNTesting\models\official\mnist\mnist_test.py",line 24, in <module>
    from official.mnist import mnist
ModuleNotFoundError: No module named 'official'

I have followed their official directions and set my python path using


and can confirm that


and I have also installed the dependencies successfully. Does anyone have experience using these models on a windows system and can help me with this pathing issue? I’m not sure what I have done incorrectly here.



if anyone has this problem make sure that the python path variable doesn’t have quotations in it. For some reason, the readme has quotations around it.

Here is the correct way to set it


Answered By – Ryan Brady

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published