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

OSError on Pycharm #20

Open
Lau-W opened this issue Jun 9, 2020 · 1 comment
Open

OSError on Pycharm #20

Lau-W opened this issue Jun 9, 2020 · 1 comment

Comments

@Lau-W
Copy link

Lau-W commented Jun 9, 2020

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?

@throni3git
Copy link

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

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

2 participants