M1 catboost 설치 오류 해결

build catboost 1.0.5 from source with miniconda using the following steps

conda version : conda 4.11.0 (homebrew miniconda)
OS: Apple Silicon M1
python version : 3.9.10
catboost version : 1.0.5

install error

$pip install catboost
ERROR: Could not find a version that satisfies the requirement catboost (from versions: none)
ERROR: No matching distribution found for catboost

install catboost

$git clone https://github.com/catboost/catboost.git

$cd catboost/catboost/python-package/catboost

# DPYTHON_CONFIG에 본인 python3 config 경로 넣기
$../../../ya make -r -DUSE_ARCADIA_PYTHON=no -DOS_SDK=local \
-DPYTHON_CONFIG=/opt/homebrew/Caskroom/miniconda/base/envs/imok/bin/python3-config \
--target-platform=CLANG12-DARWIN-ARM64

# DPYTHON_BIN에 본인 python3 bin 경로 넣기
$python3 ../mk_wheel.py --target-platform=CLANG12-DARWIN-ARM64 \
-DPYTHON_BIN=/opt/homebrew/Caskroom/miniconda/base/envs/imok/bin/python3 \
-DPYTHON_CONFIG=/opt/homebrew/Caskroom/miniconda/base/envs/imok/bin/python3-config \
-DHAVE_CUDA=no --build-widget=no

$cd ..

$pip install catboost-1.0.5-cp39-none-macosx_11_0_arm64.macosx_12_0_arm64.whl

catboost version check

import catboost
catboost.__version__

Reference

https://github.com/catboost/catboost/issues/1526

좋은 웹페이지 즐겨찾기