I recommend that you install Anaconda so that there are no issues with installing Python and using it for fastText. Detailed instructions for installing Anaconda are given on the official documentation page, which can be accessed at https://conda.io/docs/user-guide/install/linux.html. Simply stated, if you are on Windows, then download the Windows installer, double-click on it, and then follow the instructions on the screen. Installing it using a GUI is also possible for macOS.
In the case of Linux and macOS, download the corresponding bash file and then run the following command in a Terminal:
$ bash downloadedfile.sh
Please take care to download and install it using installers that are tagged for Python 3.x. The Python code snippets that will be shown in this book will be shown for Python 3.x.