computer
m1 에서 scikit learn 설치하는 법
데이터조이
2023. 4. 28. 17:30
반응형
https://stackoverflow.com/questions/68620927/installing-scipy-and-scikit-learn-on-apple-m1
Installing scipy and scikit-learn on apple m1
The installation on the m1 chip for the following packages: Numpy 1.21.1, pandas 1.3.0, torch 1.9.0 and a few other ones works fine for me. They also seem to work properly while testing them. However
stackoverflow.com

13
Finally managed to sort this using below steps:
install python 3.9 using brew
(brew install python@3.9)
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}"
>> git clone https://github.com/scipy/scipy.git
>> cd scipy
>> git submodule update --init
>> /opt/homebrew/bin/pip3 install .
>> /opt/homebrew/bin/pip3 install scikit-learn
go to the folder where virtual env needs to be created and run python3 -m venv --system-site-packages .venv
Share
Improve this answer
Follow
반응형