Finally managed to sort this using below steps:
- install python 3.9 using brew (brew install [email protected])
- setup PATH to pick brew python3 first (export PATH=opt/homebrew/bin:$PATH)
- Run below commands to install scipy and scikit-learn
>> /opt/homebrew/bin/brew install openblas
>> export OPENBLAS=$(/opt/homebrew/bin/brew --prefix openblas)
>> export CFLAGS="-falign-functions=8 ${CFLAGS}"