Tip/ML&DL
M1 Macbook pro, Python KMeans clustering 사용시 오류 해결
데구르르
2022. 12. 4. 11:59
KMeans clustering 코드를 넣고 실행하려 하니 Windows11 PC는 잘 돌아가는데,
Macbook에서는 돌아가지 않아서, 해결 방법을 찾다가 기록해둔다.
sklearn KMeans is not working as I only get 'NoneType' object has no attribute 'split' on nonEmpty Array
I don't know what is wrong but suddenly KMeans from sklearn is not working anymore and I don't know what I am doing wrong. Has anyone encountered this problem yet or knows how I can fix it? from sk...
stackoverflow.com
제안되었고, 효과가 있었던 방법은 threadpoolctl의 버전 업그레이드였다.
# threadpoolctl 버전 확인
import threadpoolctl
print(threadpoolctl.__version__)
# threadpoolctl 업그레이드
pip install threadpoolctl --upgrade
내 경우에는 기존 버전이 2.2.0 이었고, 업그레이드 후 3.1.0이 되며 문제가 해결되었다.