ModuleNotFoundError: No module named 'datasets'

My scripts run into the following error:

import datasets
ModuleNotFoundError: No module named ‘datasets’

However, the datasets package is already installed (pip3 install datasets). Here is the info:
$ pip3 freeze | grep datasets
datasets==2.4.0

Could anyone provide some pointers on what’s wrong here?