Open Lau-W opened 4 years ago
As stated in pyfilterbank/sosfiltering.py
you can compile the C files. I think this should be fixed maybe by providing a setup.py.
For completeness, i drop the instructions for gcc here (with the correct filenames):
Linux users:
$ gcc -c -std=c99 -O3 sosfilt.c
$ gcc -shared -o sosfilt.so sosfilt.o
Windows users:
$ gcc -c -std=c99 -O3 sosfilt.c
$ gcc -shared -o sosfilt.dll sosfilt.o
Hello, I installed the module and get this when running:
File "/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/init.py", line 11, in
from . import butterworth
File "/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/butterworth.py", line 9, in
from pyfilterbank.sosfiltering import bilinear_sos
File "/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/sosfiltering.py", line 74, in
_c = ffi.dlopen(_mylibpath)
File "/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library '/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/sosfilt.so': dlopen(/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/sosfilt.so, 2): no suitable image found. Did find:
/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/sosfilt.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/sosfilt.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00. Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/lautaro_wlasenkov/opt/anaconda3/envs/pl-4_6/lib/python3.7/site-packages/pyfilterbank/sosfilt.so'
Can you help me?