stockton
Posts: 72
Joined: Mon Aug 24, 2015 6:06 am

pHat python import issue

Wed Jan 03, 2018 4:57 pm

I have just installed pHat speaker that I got from Pimoroni on my Raspberry B v3 running latest raspbian OS.
When running the test suggested on https://shop.pimoroni.com/products/speaker-phat I get the following error.
I am not a python programmer and need some help please.

testing text-to-speech


testing VU meter
Traceback (most recent call last):
File "/home/pi/Pimoroni/speakerphat/test/test.py", line 9, in <module>
import speakerphat
ImportError: No module named speakerphat

I have yet to get a peep out of the speaker..

stockton
Posts: 72
Joined: Mon Aug 24, 2015 6:06 am

Re: pHat python import issue

Thu Jan 04, 2018 7:09 am

and when I attempt the following it still fails

[email protected]:~ $ sudo pip install speakerphat
Collecting speakerphat
Could not find a version that satisfies the requirement speakerphat (from versions: )
No matching distribution found for speakerphat

B.Goode
Posts: 5990
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: pHat python import issue

Sun Jan 07, 2018 10:09 am

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.

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: No registered users and 6 guests