pip install tkinter python 2.7 code example Example 1: pip install tkinter pip install tk Example 2: pip install tkinter python -m pip install tk