Can't find portaudio in alpine docker container #467
Copy link
Copy link
Open
Description
I was having trouble locating the portaudio library inside an alpine docker container. It appears that this is because ctypes.util.find_library has trouble finding libraries in some cases. The workaround is to make a symlink to the library without the digit:
apk add portaudio
cd /usr/lib && ln -s [library.name.[0-9]] [library.name]
I found this solution here: https://bugs.python.org/issue43642
It looks like maybe this issue on the cpython repo has some further discussion:
from: python/cpython#18380
Leaving this issue here for anyone else who is looking for a workaround.
example error text (for searches)
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/local/lib/python3.11/site-packages/sounddevice.py", line 71, in <module>
raise OSError('PortAudio library not found')
OSError: PortAudio library not found
libportaudio alpine docker python portaudio
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
FX-Wood commentedon May 11, 2023
More discussion here:
docker-library/python#111
python/cpython#65821