Step 1: Installing pygame module. As the name suggests it is used in building games in python. Pygame is the python library that provides functionality for drawing graphics, drawing lines, making geometry, and many shapes easily. We need a pygame library for this python sudoku game. Install pygame using the below command.