Raspberry Pi compatibility
See original GitHub issueHad some issues using this on a Raspberry Pi 3 Model B+. The first issue is that the version of libsrtp2
in Debian Stretch is too old to support pylibsrtp which this repo depends on. I managed to fix this by installing the version of libsrtp2-dev
from debian testing (buster) and mixing package sources. No big deal there.
The bigger issue with the raspberry pi is that the native aiortc.codecs._opus
module is not generated in the version of aiortc that I installed with pip
from PyPI. Attempts to import this package failed with error messages below [1]. I can confirm that the _opus.abi3.so
(nor _vpx.abi3.so
) file did not exist in the library folder where aiortc was installed when I used PIP. I had to build aiortc from source (and install tons of build dependencies like mesa
and fontconfig
to do it, even though this is not a graphical system), and that works just fine with the examples. Is there a bug with installing this package on ARM?
- [1]
File "cli.py", line 7, in <module>
from aiortc import RTCPeerConnection
File "/usr/local/lib/python3.5/dist-packages/aiortc/__init__.py", line 10, in <module>
from .rtcpeerconnection import RTCPeerConnection # noqa
File "/usr/local/lib/python3.5/dist-packages/aiortc/rtcpeerconnection.py", line 8, in <module>
from .codecs import MEDIA_CODECS
File "/usr/local/lib/python3.5/dist-packages/aiortc/codecs/__init__.py", line 3, in <module>
from .opus import OpusDecoder, OpusEncoder
File "/usr/local/lib/python3.5/dist-packages/aiortc/codecs/opus.py", line 4, in <module>
from ._opus import ffi, lib
ImportError: No module named 'aiortc.codecs._opus'```
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
I fired up a virtual Pi using Qemu and the latest Raspbian pi image, and:
apt install libsrtp2-dev
(from buster, as you rightly pointed out the one in stretch is too old)apt install libffi-dev libopus-dev libvpx-dev
(stretch version is fine)pip3 install aiortc
I was very surprised to see:
It looks as though
piwheels
is doing something wrong, it’s shipping a supposedly version and arch independent wheel - which can’t be right since aiortc builds two binary extensions.The situation is frustrating, we definitely want to use
piwheels
for aiortc’s dependencies (hello numpy and opencv) but apparently not for aiortc itself. I can’t tell yet whether I did something wrong in aiortc’s setup.py or whetherpiwheels
is doing something wrong.Thanks to @bennuttall and @waveform80 you can now install aiortc and its dependencies directly in wheel format for Raspberry Pi. Go do something cool @willmtemple and blog about it 😃