Talip7/scikit-learn-issues-multilabel huggingface dataset:
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
No this is not it. I tried again, and this time my memory usage is fine I still get the process killed problem on a new env.

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
Hum, on an env that fails to import sklearn, I tried to use `otool -L` on one of the dynlibs and I get:

```
otool -L  sklearn/__check_build/_check_build.cpython-310-darwin.so
[1]    91245 killed     otool -L sklearn/__check_build/_check_build.cpython-310-darwin.so
```

while:

```
file  sklearn/__check_build/_check_build.cpython-310-darwin.so
sklearn/__check_build/_check_build.cpython-310-darwin.so: Mach-O 64-bit bundle arm64
```

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
re: `which clang`, creating a new env, after `hash -r` returns:

    /Users/maren/mambaforge/envs/sklearn-env/bin/clang

and building in this env results in the same crash.

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
I found the culprit, it's the clang-12 compiler toolchain from conda-forge. If you install the clang-11 version, everything is fine. Just add `clang-11` to the list of package to add the constraints for the new env:

```
conda create -n sklearn-env -y -c conda-forge numpy scipy cython clang-11 compilers joblib threadpoolctl pytest
conda activate sklearn-env
make clean
pip install --verbose --no-build-isolation --editable .
python -c "import sklearn; sklearn.show_versions()"
```

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
I will report to conda-forge.

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
My question is why @thomasjpfan can't reproduce it then.

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
Here is the bug report: https://github.com/conda-forge/compilers-feedstock/issues/41

> My question is why @thomasjpfan can't reproduce it then.

Maybe he still had a clang-11 based env activated in his path when he ran the tests. Also sometimes the problem would disappear even in my `sklearn-env` (maybe because I had additional deps that would require `clang-11` in my env?). I am not sure.

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
> I've noticed I need to install wheel on every new env, we probably should include it in our build dependencies and docs.

If you build the env with conda-forge as explained in the doc then you don't need to install it explicitly in my experience.

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
I can confirm that when using`clang-11` in a conda environment everything works fine. @adrinjalali and I checked whether  using `compilers=1.4.1` solves the issue but it doesn't (see [this comment](https://github.com/conda-forge/compilers-feedstock/issues/41#issuecomment-1058943472)).

Labels: Bug, Build / CI
Unable to successfully install scikit-learn development version with MacBookPro with chip Apple M1 Pro

### Describe the bug

I installed the development version of scikit-learn on my computer (MacBookPro with chip Apple M1 Pro). When I ran pytest I got the following error: 
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```

I investigated what's going on an this is the result: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

I'm using a conda environment. I used the Miniforge3-MacOSX-arm64 download from here: https://github.com/conda-forge/miniforge#miniforge

This is the content of my sklearn-dev conda environment: 
https://gist.github.com/marenwestermann/c01fc4d3044522e329ce83d16680e1a5

### Steps/Code to Reproduce

```
pytest
```

```
python -vvv -c "import sklearn"
```

### Expected Results

The expected result would be that when the command `pytest` is run all test are either skipped or are successful. 

### Actual Results

Pytest result:
```
(sklearn-dev) ➜  scikit-learn git:(main) pytest
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/maren/Documents/scikit-learn, configfile: setup.cfg, testpaths: sklearn
plugins: xdist-2.5.0, forked-1.4.0, cov-3.0.0
collecting ... [1]    54294 killed     pytest
```
Further investigation: 
https://gist.github.com/marenwestermann/9ffddb7a2f0ef6798d350f3595997ed1

### Versions

```shell
function>
```

COMMENT:
@marenwestermann the upstream bug has been resolved in the conda-forge packages installed via the `compilers` meta-package. I tried on my machine and confirm the fix. Let me know if it does not work for you (in a new env).

Let me close this issue. Thanks for the report.

Labels: Bug, Build / CI