pip install -e ".[dev]" not working
Author: Aravind-11
Pull request: no
Labels: name: bug

### System Info

While running pip install -e ".[dev]" to install Transformers in editable mode on macOS, the installation fails when building NumPy from source.

The process produces hundreds of warnings from numpy/core/src/umath/simd.inc.src about using abs() instead of labs() for npy_intp (type long), and then terminates with: 

error: Command "clang ... scalartypes.c" failed with exit status 1
error: Failed building wheel for numpy
error: failed-wheel-build-for-install

System specs:

OS | macOS (14.6 Sonoma)
CPU Arch | Intel x86_64
Python | e.g. 3.10.14 (Anaconda environment)

This is the truncated error message : 

```

      Building wheels for collected packages: numpy
        Building wheel for numpy (pyproject.toml): started
        Building wheel for numpy (pyproject.toml): still running...
        Building wheel for numpy (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for numpy (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [1563 lines of output]
            setup.py:67: RuntimeWarning: NumPy 1.19.3 may not yet support Python 3.10.
              warnings.warn(
            Running from numpy source directory.
            numpy/random/_bounded_integers.pxd.in has not changed
            numpy/random/_philox.pyx has not changed
            numpy/random/_bounded_integers.pyx.in has not changed
            numpy/random/_sfc64.pyx has not changed
            numpy/random/_mt19937.pyx has not changed
            numpy/random/bit_generator.pyx has not changed
            Processing numpy/random/_bounded_integers.pyx
            numpy/random/mtrand.pyx has not changed
            numpy/random/_generator.pyx has not changed
            numpy/random/_pcg64.pyx has not changed
            numpy/random/_common.pyx has not changed
            Cythonizing sources
            blas_opt_info:
            blas_mkl_info:
            customize UnixCCompiler
              libraries mkl_rt not found in ['/opt/anaconda3/envs/transformers/lib', '/usr/local/lib', '/usr/lib']
              NOT AVAILABLE
      
            blis_info:
              libraries blis not found in ['/opt/anaconda3/envs/transformers/lib', '/usr/local/lib', '/usr/lib']
              NOT AVAILABLE
      
            openblas_info:
              libraries openblas not found in ['/opt/anaconda3/envs/transformers/lib', '/usr/local/lib', '/usr/lib']
              NOT AVAILABLE
      
            atlas_3_10_blas_threads_info:
            Setting PTATLAS=ATLAS
              libraries tatlas not found in ['/opt/anaconda3/envs/transformers/lib', '/usr/local/lib', '/usr/lib']
              NOT AVAILABLE
      
            atlas_3_10_blas_info:
              libraries satlas not found in ['/opt/anaconda3/envs/transformers/lib', '/usr/local/lib', '/usr/lib']
              NOT AVAILABLE
      
            atlas_blas_threads_info:
            Setting PTATLAS=ATLAS
              libraries ptf77blas,ptcblas,atlas not found in ['/opt/anaconda3/envs/transformers/lib', '/usr/local/lib', '/usr/lib']
              NOT AVAILABLE
 2610 |     if (IS_BINARY_REDUCE && 0) {
                  |                             ^
                  |                             /* DISABLES CODE */ ( )
            numpy/core/src/umath/loops.c.src:2611:22: warning: code will never be executed [-Wunreachable-code]
             2611 |         npy_intp n = dimensions[0];
                  |                      ^~~~~~~~~~
            numpy/core/src/umath/loops.c.src:2610:29: note: silence by adding parentheses to mark code as explicitly dead
             2610 |     if (IS_BINARY_REDUCE && 0) {
                  |                             ^
                  |                             /* DISABLES CODE */ ( )
            clang: numpy/core/src/common/ufunc_override.c
            clang: numpy/core/src/common/npy_longdouble.c
            clang: numpy/core/src/common/cblasfuncs.c
            clang: build/src.macosx-10.15-x86_64-3.10/numpy/core/src/umath/scalarmath.c
            clang: /private/var/folders/nr/ps3kxszd1h38llpddyzz097r0000gn/T/pip-install-lyje4nxm/numpy_82b6115a8f2a47d698b60dc07c4eb3df/numpy/_build_utils/src/apple_sgemv_fix.c
            clang: numpy/core/src/common/numpyos.c
            In file included from /private/var/folders/nr/ps3kxszd1h38llpddyzz097r0000gn/T/pip-install-lyje4nxm/numpy_82b6115a8f2a47d698b60dc07c4eb3df/numpy/_build_utils/src/apple_sgemv_fix.c:26:
            In file included from numpy/core/include/numpy/arrayobject.h:4:
            In file included from numpy/core/include/numpy/ndarrayobject.h:21:
            build/src.macosx-10.15-x86_64-3.10/numpy/core/include/numpy/__multiarray_api.h:1463:1: warning: unused function '_import_array' [-Wunused-function]
             1463 | _import_array(void)
                  | ^~~~~~~~~~~~~
            1 warning generated.
            clang: numpy/core/src/common/python_xerbla.c
            clang: numpy/core/src/multiarray/mapping.c
            clang: numpy/core/src/multiarray/methods.c
            60 warnings generated.
            clang: build/src.macosx-10.15-x86_64-3.10/numpy/core/src/umath/matmul.c
            clang: build/src.macosx-10.15-x86_64-3.10/numpy/core/src/umath/clip.c
            error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/envs/transformers/include -fPIC -O2 -isystem /opt/anaconda3/envs/transformers/include -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-10.15-x86_64-3.10/numpy/core/src/umath -Ibuild/src.macosx-10.15-x86_64-3.10/numpy/core/src/npymath -Ibuild/src.macosx-10.15-x86_64-3.10/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.15-x86_64-3.10/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/anaconda3/envs/transformers/include/python3.10 -Ibuild/src.macosx-10.15-x86_64-3.10/numpy/core/src/common -Ibuild/src.macosx-10.15-x86_64-3.10/numpy/core/src/npymath -c build/src.macosx-10.15-x86_64-3.10/numpy/core/src/multiarray/scalartypes.c -o build/temp.macosx-10.15-x86_64-3.10/build/src.macosx-10.15-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o -MMD -MF build/temp.macosx-10.15-x86_64-3.10/build/src.macosx-10.15-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o.d -msse3 -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for numpy
      Failed to build numpy
      error: failed-wheel-build-for-install
      
      × Failed to build installable wheels for some pyproject.toml based projects
      ╰─> numpy
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

```



### Who can help?

@molbap 
### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

run pip install -e ".[dev]"

### Expected behavior

Should be able to sucessfully install transformers dev version. 

Comments:
Are you using a virtual environment? I can’t seem to recreate the error on my device.

> Are you using a virtual environment? I can’t seem to recreate the error on my device.

Yes. I'm using a conda environment.