stuck on "Installing build dependencies ..." while installing scikit-learn

Viewed 3079

I am getting stuck on

  Installing build dependencies ... \

whenever I am trying to install scikit-learn, I am using M1 Macbook Air.

Here is the image: here is the image

2 Answers

the only fix that i have got for this is just installing Anaconda and because i think the Scikit Learn Modules are not supporting M1 rn.

I checked on scikit-learn document and found this:

the recently introduced macos/arm64 platform (sometimes also known as macos/aarch64) requires the open source community to upgrade the build configuation and automation to properly support it.

At the time of writing (January 2021), the only way to get a working installation of scikit-learn on this hardware is to install scikit-learn and its dependencies from the conda-forge distribution, for instance using the miniforge installers:

https://github.com/conda-forge/miniforge

The following issue tracks progress on making it possible to install scikit-learn from PyPI with pip:

https://github.com/scikit-learn/scikit-learn/issues/19137

I faced the same issue with the latest version of Python. So I did this:

  • Downgrade the version to 3.8.10
  • and then pip3 install sklearn

And it worked for me.

Related