How to fix the «No module named 'pycocotools'» TensorFlow error in Ubuntu 18.04?

Install the COCO API.