I am trying the above project
plz help me to solve the error
He is using Ubuntu Dekstop instead of Ubuntu server. In ubuntu OS there is a display available where you can see the output of tinker program. Ubuntu server does not any display attached. I will suggest you to do your python setup on windows then run your program or install ubuntu desktop.
Do let me know in case you need any other information.