how to check if pygame is installed in ubuntu

Shell
pip freeze | grep <pack_name>
Source

Also in Shell: