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

Error installing on M1 Mac / Python 3.8 (sosfilt.so no suitable image found) #22

Open
benghau opened this issue Oct 19, 2021 · 1 comment

Comments

@benghau
Copy link

benghau commented Oct 19, 2021

I successfully installed pyfilterbank according to the installation on the README, with no errors.

But when I imported pyfilterbank in my Jupiter notebook I received this error:

OSError: cannot load library '/Users/bg/miniforge3/envs/tf/lib/python3.8/site-packages/pyfilterbank/sosfilt.so': dlopen(/Users/bg/miniforge3/envs/tf/lib/python3.8/site-packages/pyfilterbank/sosfilt.so, 2): no suitable image found.  Did find:
	/Users/bg/miniforge3/envs/tf/lib/python3.8/site-packages/pyfilterbank/sosfilt.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/Users/bg/miniforge3/envs/tf/lib/python3.8/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/bg/miniforge3/envs/tf/lib/python3.8/site-packages/pyfilterbank/sosfilt.so'

Any advice on how to resolve this issue?

@hahnec
Copy link

hahnec commented Sep 29, 2022

To resolve the import error on my macOS, I used the following commands in the directory where sosfilt.so is located:

$ gcc -c -std=c99 -O3 sosfilt.c
$ gcc -shared -o sosfilt.so 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