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:
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?
I had success with
brew install libompCFLAGS="-Xpreprocessor -fopenmp" LDFLAGS="-L/opt/homebrew/opt/libomp/lib -lomp" pip install --force-reinstall --no-cache-dir fcwt
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?