The module was called
Tkinter, with a capital
T, in Python 2.7.
Python 3 renamed most stdlib modules that didn’t fit the coding standard (mostly because they’d been added before there was a coding standard). By 2018, most books, YouTube tutorials, Stack Overflow answers, blog posts, etc. are going to show you Python 3, so if you want to or have to keep using Python 2.7 for some reason, you need to know how to find the Python 2 docs.
Fortunately, once you’re at the Python 3 docs, this is easy: just go to the little option menu in the navigation bar that says “3.7” or whatever, and change it to “2.7”.
solved How can I use tkinter library with Python 2.7 [closed]