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

Running fcwt on Macbook M3 #69

Open
Rievil opened this issue Sep 26, 2024 · 1 comment
Open

Running fcwt on Macbook M3 #69

Rievil opened this issue Sep 26, 2024 · 1 comment

Comments

@Rievil
Copy link

Rievil commented Sep 26, 2024

I am trying to run fcwt on Macbook M3 chip, (Python 3.12.6), OS Sonoma 14.6.1. I am have created venv (Envs/base) for testing fcwt. I am trying to run the very first python example on repo of fcwt. On windows it runs perfectly. On M3 Macbook I get error:

Traceback (most recent call last):

File ~/Documents/Envs/base/lib/python3.12/site-packages/fcwt/init.py:1
from .fcwt import Morlet, Scales, FCWT, FCWT_LINSCALES, FCWT_LOGSCALES, FCWT_LINFREQS

File ~/Documents/Envs/base/lib/python3.12/site-packages/fcwt/fcwt.py:13
from . import _fcwt

ImportError: dlopen(/Users/user/Documents/Envs/base/lib/python3.12/site-packages/fcwt/_fcwt.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_omp_get_max_threads

Did anybody else get the same error? When I run:

import os print(f"OMP_NUM_THREADS: {os.getenv('OMP_NUM_THREADS')}")

I got OMP_NUM_THREADS: None so it seems its is perhaps problem of OpenMP, but I am really stuck at this moment. Can someone help?

@freekv
Copy link

freekv commented Nov 5, 2024

I had success with
brew install libomp
CFLAGS="-Xpreprocessor -fopenmp" LDFLAGS="-L/opt/homebrew/opt/libomp/lib -lomp" pip install --force-reinstall --no-cache-dir fcwt

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