There does not seem to be any documentation on the Pimoroni site you referenced that suggests that the speakerphat module can be installed using pip.
There is a simple installer available at https://get.pimoroni.com/speakerphat
: have you sucessfully downloaded and run this, and rebooted afterwards as suggested?
The test.sh shell script that you have run should produce audio via a number of different methods before it gets to the failed python script. If you hear nothing, it suggests you may have a cabling/connection problem, especially in the light of your other thread about the non-functioning led button. (The python script only demonstrates the use of the display as a vu-meter, it does not check audio output.)
Edit: [added later]. Noted your thread on the Pimoroni forums, which is probably the best way to get focussed advice on this issue, so I will withdraw.