I cloned the lasted object detection api and installed tensorflow-gpu 1.9, when I trained the model with 'model_main.py', it generated:
TclError: no display name and no $DISPLAY environment variable
How to solve it?
Disclamer: I am not familiar with tenserflow.
That said, the problem is that you are expected to be running an interpreter with a GUI environment but that you are not.
Make sure you start with the GUI version of the interpreter (“pythonw”) and/or have the GUI libs installed and available for the interpreter to initialize as needed.
This is true whether or not you are on *nixen: the interpreter does some behind-the-scenes magic to make it appear that you have an X-display, but only if the interpreter is specialized to do that. Hence the difference between “python” and “pythonw”, “tclsh” and “wish”, etc.
tl;dr
You cannot run tenserflow (it seems) from the console terminal version of the interpreter.