title: Can't pip install scipy on M1
body: <p>I can't &quot;pip instal scipy&quot; on my m1 mac, I get an error:</p>
  <pre><code>Collecting scipy
    Using cached scipy-1.7.3.tar.gz (36.1 MB)
    Installing build dependencies ... error
    error: subprocess-exited-with-error
    
    × pip subprocess to install build dependencies did not run successfully.
    │ exit code: 1
    ╰─&gt; [3280 lines of output]
        Looking in indexes: https://pypi.org/simple, https://pypi.dev.project.com/pypi/, https://pypi.dev.project.com/pypi/
        Ignoring numpy: markers 'python_version == &quot;3.7&quot; and platform_machine == &quot;aarch64&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.8&quot; and platform_machine == &quot;aarch64&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.8&quot; and (platform_machine != &quot;arm64&quot; or platform_system != &quot;Darwin&quot;) and platform_python_implementation != &quot;PyPy&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.9&quot; and (platform_machine != &quot;arm64&quot; or platform_system != &quot;Darwin&quot;) and platform_python_implementation != &quot;PyPy&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.10&quot; and platform_python_implementation != &quot;PyPy&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.7&quot; and platform_python_implementation == &quot;PyPy&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.8&quot; and platform_python_implementation == &quot;PyPy&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.9&quot; and platform_python_implementation == &quot;PyPy&quot;' don't match your environment
        Ignoring numpy: markers 'python_version == &quot;3.10&quot; and platform_python_implementation == &quot;PyPy&quot;' don't match your environment
        Collecting wheel&lt;0.38.0
          Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
        Collecting setuptools&lt;58.0.0
          Using cached setuptools-57.5.0-py3-none-any.whl (819 kB)
        Collecting Cython&lt;3.0,&gt;=0.29.18
          Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
        Collecting pybind11&lt;2.8.0,&gt;=2.4.3
          Using cached pybind11-2.7.1-py2.py3-none-any.whl (200 kB)
        Collecting pythran&lt;0.10.0,&gt;=0.9.12
          Using cached pythran-0.9.12.post1-py3-none-any.whl (4.3 MB)
        Collecting numpy==1.16.5
          Using cached numpy-1.16.5.zip (5.1 MB)
          Preparing metadata (setup.py): started
          Preparing metadata (setup.py): finished with status 'done'
        Collecting ply&gt;=3.4
          Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
        Collecting gast~=0.5.0
          Using cached gast-0.5.3-py3-none-any.whl (19 kB)
        Collecting beniget~=0.4.0
          Using cached beniget-0.4.1-py3-none-any.whl (9.4 kB)
        Building wheels for collected packages: numpy
          Building wheel for numpy (setup.py): started
          Building wheel for numpy (setup.py): finished with status 'error'
          error: subprocess-exited-with-error
        
          × python setup.py bdist_wheel did not run successfully.
          │ exit code: 1
          ╰─&gt; [2943 lines of output]
              Running from numpy source directory.
              blas_opt_info:
              blas_mkl_info:
              customize UnixCCompiler
                libraries mkl_rt not found in ['/Users/danieljohnson/Documents/code/project/venv/lib', '/usr/local/lib', '/usr/lib']
                NOT AVAILABLE
        
              blis_info:
              customize UnixCCompiler
                libraries blis not found in ['/Users/danieljohnson/Documents/code/project/venv/lib', '/usr/local/lib', '/usr/lib']
                NOT AVAILABLE
        
              openblas_info:
              customize UnixCCompiler
              customize UnixCCompiler
                libraries openblas not found in ['/Users/danieljohnson/Documents/code/project/venv/lib', '/usr/local/lib', '/usr/lib']
                NOT AVAILABLE
  </code></pre>
  <p>... the end of the error is:</p>
  <pre><code>error: Command &quot;clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/danieljohnson/Documents/code/project/venv/lib/python3.7/site-packages/numpy/core/include -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-12.3-arm64-3.7/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/Users/danieljohnson/Documents/code/project/venv/include -I/Users/danieljohnson/.pyenv/versions/3.7.13/include/python3.7m -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/common -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/common -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/npymath -c build/src.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/_multiarray_tests.c -o build/temp.macosx-12.3-arm64-3.7/build/src.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/_multiarray_tests.o -MMD -MF build/temp.macosx-12.3-arm64-3.7/build/src.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/_multiarray_tests.o.d&quot; failed with exit status 1
              [end of output]
        
          note: This error originates from a subprocess, and is likely not a problem with pip.
        error: legacy-install-failure
        
        × Encountered error while trying to install package.
        ╰─&gt; numpy
        
        note: This is an issue with the package mentioned above, not pip.
        hint: See above for output from the failure.
        [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
  ╰─&gt; See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  </code></pre>
  <p>I've tried pip and pip3 uninstalling numpy, using older versions, installing scypi with --no-deps.</p>
  <p>I can import numpy in a python console.</p>
  <p>A &quot;pip show numpy&quot; displays:</p>
  <pre><code>Name: numpy
  Version: 1.21.6
  Summary: NumPy is the fundamental package for array computing with Python.
  Home-page: https://www.numpy.org
  Author: Travis E. Oliphant et al.
  Author-email: 
  License: BSD
  Location: /Users/danieljohnson/Documents/code/project/venv/lib/python3.7/site-packages
  Requires: 
  Required-by: pandas
  </code></pre>
  <p>I'm not sure what to try. I think it either has something to do with the m1 architecture or the install not being able to find numpy for some reason.</p>