Skip to content

Can't find portaudio in alpine docker container #467

Open
@FX-Wood

Description

@FX-Wood

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions