mac os11 (m1)安装sklearn 成功

这篇博客指导如何安装scikit-learn库,包括依赖库的版本要求,如Python, NumPy, SciPy等。提供了使用pip安装的详细步骤,并强调在PyPy环境下安装的注意事项。安装完成后,通过检查导入scikit-learn并显示版本信息来验证安装成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1检查bug

pip install --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn

依赖库

Python (>= 3.6),

NumPy (>= 1.13.3),

SciPy (>= 0.19.1),

Joblib (>= 0.11),

threadpoolctl (>= 2.0.0).

2如果没有事先安装,当你building scikit-learn时候 这些库会自动安装

Note: For running on PyPy, PyPy3-v5.10+, Numpy 1.14.0+, and scipy 1.1.0+ are required. For PyPy, only installation instructions with pip apply.

git clone git://github.com/scikit-learn/scikit-learn.git  # add --depth 1 if your connection is slow
cd scikit-learn
pip install cython
pip install --verbose --no-build-isolation --editable .

3检查装好的scikit-learn 结尾有.dev0: 安装成功

python -c "import sklearn; sklearn.show_versions()"

创建 Scikit-learn 还有库 :

Cython >= 0.28.5

A C/C++ compiler and a matching OpenMP runtime library. See the platform system specific instructions for more details.

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值