Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import soundfile when docker running #238

Open
toren332 opened this issue Jun 20, 2019 · 6 comments
Open

Can't import soundfile when docker running #238

toren332 opened this issue Jun 20, 2019 · 6 comments

Comments

@toren332
Copy link

In simple run application everything okay,
But when try to launch my app I've got the error:
File "/code/api_v1/urls.py", line 3, in
from . import views
File "/code/api_v1/views.py", line 11, in
import soundfile as sf
File "/usr/local/lib/python3.7/site-packages/soundfile.py", line 267, in
_snd = _ffi.dlopen('sndfile')
File "/usr/local/lib/python3.7/site-packages/cffi/api.py", line 146, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/usr/local/lib/python3.7/site-packages/cffi/api.py", line 828, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "/usr/local/lib/python3.7/site-packages/cffi/api.py", line 823, in _load_backend_lib
raise OSError(msg)
OSError: ctypes.util.find_library() did not manage to locate a library called 'sndfile'

@bastibe
Copy link
Owner

bastibe commented Jun 21, 2019

Do you have libsndfile installed in your docker container? SoundFile doesn't seem to think so.

@gvammer
Copy link

gvammer commented Nov 7, 2019

The same problem. libsndfile1 is installed

@bastibe
Copy link
Owner

bastibe commented Nov 7, 2019

As the error states, ctypes.util.find_library() is unable to locate sndfile. You'll have to check your paths and include libsndfile in the library search path.

@DungLeMTA
Copy link

Khi lỗi trạng thái, ctypes.util.find_library()không thể định vị sndfile. Bạn sẽ phải kiểm tra các đường dẫn của mình và đưa libsndfile vào đường dẫn tìm kiếm thư viện.

Can you explain detailed it for me ? Thanks !

@bastibe
Copy link
Owner

bastibe commented Aug 29, 2021

This is a problem on your computer. You have to configure your system so ctypes.util.find_library() can find libsndfile.

@MuhammadAhmedAbbasi
Copy link

image

Does anyone have idea how to solve this issue, I tried

Install system dependencies

RUN apt-get update && apt-get install -y libsndfile1

but not working for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants