The demo
Unfortunately, due to PyGame not being supported by Google Colab, you'll need to use Anaconda.
Thankfully, you should have it installed after Chapter 10, AI for Autonomous Vehicles – Build a Self-Driving Car, so it'll be easier to install the required packages and libraries.
Installation
First, create a new virtual environment inside Anaconda. This time, I'll walk you through the installation on the Anaconda Prompt from a PC, so that you can all see how it's done from any system.
Windows users, please open the Anaconda Prompt on your PC, and Mac/Linux users, please open your Terminal on Mac/Linux. Then type:
conda create -n snake python=3.6
Just like so:
Then, hit Enter on your keyboard. You should get something more or less like this:
Type y
on your keyboard and hit Enter once again. After everything gets installed, type this in your Anaconda Prompt:
conda activate snake
And hit Enter once again...