Hi guys! It’s me again
I recently did a bad thing and messed up a crontab call, so had to erase all my work from my Raspberry Pi’s SD card (booo). Luckily I had it all backed up on a repository (yaaay).
However, when I’ve come to reinstall Edge Impulse on my device, I can’t remember whatever wizardry and magic I did to make it work last time. It wasn’t anywhere as difficult as it is now, so I must be missing a step. I went over my previous thread and tried everything in there in different ways to no avail.
I keep getting messages such as:
Could not import the PyAudio C module ‘_portaudio’.
Traceback (most recent call last):
File “classifier.py”, line 10, in
from edge_impulse_linux.image import ImageImpulseRunner
File “/usr/local/lib/python3.7/dist-packages/edge_impulse_linux/init.py”, line 2, in
from edge_impulse_linux import audio
File “/usr/local/lib/python3.7/dist-packages/edge_impulse_linux/audio.py”, line 3, in
File “/usr/local/lib/python3.7/dist-packages/pyaudio.py”, line 116, in
import _portaudio as pa
ImportError: libportaudio.so.2: cannot open shared object file: No such file or directory
I’ve had this with OpenCV too, and have to install all the libraries manually, which I certainly didn’t have to do last time. I installed edge impulse using the command “sudo python3 -m pip install edge_impulse_linux” and when I try to reinstall it to make sure I have the necessary libraries it tells me:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: edge_impulse_linux in /usr/local/lib/python3.7/dist-packages (1.0.4) Requirement already satisfied: opencv-python==220.127.116.11 in /usr/local/lib/python3.7/dist-packages (from edge_impulse_linux) (18.104.22.168) Requirement already satisfied: PyAudio==0.2.11 in /usr/local/lib/python3.7/dist-packages (from edge_impulse_linux) (0.2.11) Requirement already satisfied: numpy>=1.19 in /usr/local/lib/python3.7/dist-packages (from edge_impulse_linux) (1.21.0) Requirement already satisfied: psutil==5.8.0 in /usr/local/lib/python3.7/dist-packages (from edge_impulse_linux) (5.8.0)
I’m baffled, can anyone offer me any assistance please? This time around when things are working I’ll be making a clone of my SD card so I can redistribute in the future a lot easier! Thanks in advance.