The installed Python must be compiled properly, If you use pyenv and are having any issue with python please refer following link: Common Build Problems in PyENV
To use gui feature, the installed python should compiled with tkinter module.
You can test the tkinter installation with below command on your shell.