<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Installing scipy==1.8.0 fails on MacOS M1 with python3.9, because the build requires numpy 1.20.0 that doesn't build on M1 (<a href="https://github.com/scipy/scipy/blob/v1.8.0/pyproject.toml#L30">https://github.com/scipy/scipy/blob/v1.8.0/pyproject.toml#L30</a>)</p>
<p dir="auto">Can someone please update this is make it really a minimum requirement to use 1.20.0 and not a hard requirement? So have <code class="notranslate">numpy &gt;= 1.20.0</code> and not <code class="notranslate">numpy == 1.20.0</code>. Even better would be 1.20.3, which does install on M1. At the moment, no matter if I pre-install the latest version of numpy, the install for scipy fails, because it is trying to get numpy==1.20.0 to be installed.</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pip install scipy"><pre class="notranslate"><span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-s1">scipy</span></pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Collecting scipy==1.8.0
  Using cached scipy-1.8.0.tar.gz (38.3 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─&gt; [2270 lines of output]
      Looking in indexes: https://pypi.org/simple, https://artefact.skao.int/repository/pypi-internal/simple
      Ignoring numpy: markers 'python_version == &quot;3.8&quot; and platform_machine == &quot;aarch64&quot; and platform_python_implementation != &quot;PyPy&quot;' don't match your environment
      Ignoring numpy: markers 'python_version == &quot;3.8&quot; and platform_machine == &quot;arm64&quot; and platform_system == &quot;Darwin&quot;' don't match your environment
      Ignoring numpy: markers 'python_version == &quot;3.8&quot; and platform_machine == &quot;s390x&quot; and platform_python_implementation != &quot;PyPy&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_machine != &quot;aarch64&quot; and platform_machine != &quot;s390x&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 &gt;= &quot;3.11&quot;' don't match your environment
      Ignoring numpy: markers 'python_version &gt;= &quot;3.8&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;60.0.0
        Using cached setuptools-59.8.0-py3-none-any.whl (952 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.9.0,&gt;=2.4.3
        Using cached pybind11-2.8.1-py2.py3-none-any.whl (208 kB)
      Collecting pythran&lt;0.11.0,&gt;=0.10.0
        Using cached pythran-0.10.0-py3-none-any.whl (4.3 MB)
      Collecting numpy==1.20.0
        Using cached numpy-1.20.0.zip (8.0 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting gast~=0.5.0
        Using cached gast-0.5.3-py3-none-any.whl (19 kB)
      Collecting ply&gt;=3.4
        Using cached ply-3.11-py2.py3-none-any.whl (49 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 (pyproject.toml): started
        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
        ╰─&gt; [2223 lines of output]



[... the error is very long but not really relevant for scipy ...]



                assert len(base_version) == 2
            AssertionError
      
            ########### EXT COMPILER OPTIMIZATION ###########
            Platform      :
              Architecture: aarch64
              Compiler    : clang
      
            CPU baseline  :
              Requested   : 'min'
              Enabled     : NEON NEON_FP16 NEON_VFPV4 ASIMD
              Flags       : none
              Extra checks: none
      
            CPU dispatch  :
              Requested   : 'max -xop -fma4'
              Enabled     : ASIMDHP ASIMDDP
              Generated   :
                          :
              ASIMDHP     : NEON NEON_FP16 NEON_VFPV4 ASIMD
              Flags       : -march=armv8.2-a+fp16
              Extra checks: none
              Detect      : ASIMD ASIMDHP
                          : numpy/core/src/umath/_umath_tests.dispatch.c
            CCompilerOpt._cache_write[796] : write cache to path -&gt; /private/var/folders/3n/68py6wjs1t7dqlglcvwgvrcr0000gp/T/pip-install-pfa3d0mq/numpy_b0c1897da5564dec984ac45053f20aa5/build/temp.macosx-11-arm64-3.9/ccompiler_opt_cache_ext.py
      
            ########### CLIB COMPILER OPTIMIZATION ###########
            Platform      :
              Architecture: aarch64
              Compiler    : clang
      
            CPU baseline  :
              Requested   : 'min'
              Enabled     : NEON NEON_FP16 NEON_VFPV4 ASIMD
              Flags       : none
              Extra checks: none
      
            CPU dispatch  :
              Requested   : 'max -xop -fma4'
              Enabled     : ASIMDHP ASIMDDP
              Generated   : none
            CCompilerOpt._cache_write[796] : write cache to path -&gt; /private/var/folders/3n/68py6wjs1t7dqlglcvwgvrcr0000gp/T/pip-install-pfa3d0mq/numpy_b0c1897da5564dec984ac45053f20aa5/build/temp.macosx-11-arm64-3.9/ccompiler_opt_cache_clib.py
            [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: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error"><pre class="notranslate">Collecting scipy==1.8.0
  Using cached scipy-1.8.0.tar.gz (38.3 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ <span class="pl-c1">exit</span> code: 1
  ╰─<span class="pl-k">&gt;</span> [2270 lines of output]
      Looking <span class="pl-k">in</span> indexes: https://pypi.org/simple, https://artefact.skao.int/repository/pypi-internal/simple
      Ignoring numpy: markers <span class="pl-s"><span class="pl-pds">'</span>python_version == "3.8" and platform_machine == "aarch64" and platform_python_implementation != "PyPy"<span class="pl-pds">'</span></span> don<span class="pl-s"><span class="pl-pds">'</span>t match your environment</span>
<span class="pl-s">      Ignoring numpy: markers <span class="pl-pds">'</span></span>python_version == <span class="pl-s"><span class="pl-pds">"</span>3.8<span class="pl-pds">"</span></span> and platform_machine == <span class="pl-s"><span class="pl-pds">"</span>arm64<span class="pl-pds">"</span></span> and platform_system == <span class="pl-s"><span class="pl-pds">"</span>Darwin<span class="pl-pds">"</span></span><span class="pl-s"><span class="pl-pds">'</span> don<span class="pl-pds">'</span></span>t match your environment
      Ignoring numpy: markers <span class="pl-s"><span class="pl-pds">'</span>python_version == "3.8" and platform_machine == "s390x" and platform_python_implementation != "PyPy"<span class="pl-pds">'</span></span> don<span class="pl-s"><span class="pl-pds">'</span>t match your environment</span>
<span class="pl-s">      Ignoring numpy: markers <span class="pl-pds">'</span></span>python_version == <span class="pl-s"><span class="pl-pds">"</span>3.8<span class="pl-pds">"</span></span> and (platform_machine <span class="pl-k">!</span>= <span class="pl-s"><span class="pl-pds">"</span>arm64<span class="pl-pds">"</span></span> or platform_system <span class="pl-k">!</span>= <span class="pl-s"><span class="pl-pds">"</span>Darwin<span class="pl-pds">"</span></span>) and platform_machine <span class="pl-k">!</span>= <span class="pl-s"><span class="pl-pds">"</span>aarch64<span class="pl-pds">"</span></span> and platform_machine <span class="pl-k">!</span>= <span class="pl-s"><span class="pl-pds">"</span>s390x<span class="pl-pds">"</span></span> and platform_python_implementation <span class="pl-k">!</span>= <span class="pl-s"><span class="pl-pds">"</span>PyPy<span class="pl-pds">"</span></span><span class="pl-s"><span class="pl-pds">'</span> don<span class="pl-pds">'</span></span>t match your environment
      Ignoring numpy: markers <span class="pl-s"><span class="pl-pds">'</span>python_version == "3.9" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_python_implementation != "PyPy"<span class="pl-pds">'</span></span> don<span class="pl-s"><span class="pl-pds">'</span>t match your environment</span>
<span class="pl-s">      Ignoring numpy: markers <span class="pl-pds">'</span></span>python_version == <span class="pl-s"><span class="pl-pds">"</span>3.10<span class="pl-pds">"</span></span> and platform_python_implementation <span class="pl-k">!</span>= <span class="pl-s"><span class="pl-pds">"</span>PyPy<span class="pl-pds">"</span></span><span class="pl-s"><span class="pl-pds">'</span> don<span class="pl-pds">'</span></span>t match your environment
      Ignoring numpy: markers <span class="pl-s"><span class="pl-pds">'</span>python_version &gt;= "3.11"<span class="pl-pds">'</span></span> don<span class="pl-s"><span class="pl-pds">'</span>t match your environment</span>
<span class="pl-s">      Ignoring numpy: markers <span class="pl-pds">'</span></span>python_version <span class="pl-k">&gt;</span>= <span class="pl-s"><span class="pl-pds">"</span>3.8<span class="pl-pds">"</span></span> and platform_python_implementation == <span class="pl-s"><span class="pl-pds">"</span>PyPy<span class="pl-pds">"</span></span><span class="pl-s"><span class="pl-pds">'</span> don<span class="pl-pds">'</span></span>t match your environment
      Collecting wheel<span class="pl-k">&lt;</span>0.38.0
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting setuptools<span class="pl-k">&lt;</span>60.0.0
        Using cached setuptools-59.8.0-py3-none-any.whl (952 kB)
      Collecting Cython<span class="pl-k">&lt;</span>3.0,<span class="pl-k">&gt;</span>=0.29.18
        Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
      Collecting pybind<span class="pl-k">11&lt;</span>2.9.0,<span class="pl-k">&gt;</span>=2.4.3
        Using cached pybind11-2.8.1-py2.py3-none-any.whl (208 kB)
      Collecting pythran<span class="pl-k">&lt;</span>0.11.0,<span class="pl-k">&gt;</span>=0.10.0
        Using cached pythran-0.10.0-py3-none-any.whl (4.3 MB)
      Collecting numpy==1.20.0
        Using cached numpy-1.20.0.zip (8.0 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status <span class="pl-s"><span class="pl-pds">'</span>done<span class="pl-pds">'</span></span>
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status <span class="pl-s"><span class="pl-pds">'</span>done<span class="pl-pds">'</span></span>
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status <span class="pl-s"><span class="pl-pds">'</span>done<span class="pl-pds">'</span></span>
      Collecting gast~=0.5.0
        Using cached gast-0.5.3-py3-none-any.whl (19 kB)
      Collecting ply<span class="pl-k">&gt;</span>=3.4
        Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
      Collecting beniget~=0.4.0
        Using cached beniget-0.4.1-py3-none-any.whl (9.4 kB)
      Building wheels <span class="pl-k">for</span> collected packages: numpy
        Building wheel <span class="pl-k">for</span> numpy (pyproject.toml): started
        Building wheel <span class="pl-k">for</span> numpy (pyproject.toml): finished with status <span class="pl-s"><span class="pl-pds">'</span>error<span class="pl-pds">'</span></span>
        error: subprocess-exited-with-error
      
        × Building wheel <span class="pl-k">for</span> numpy (pyproject.toml) did not run successfully.
        │ <span class="pl-c1">exit</span> code: 1
        ╰─<span class="pl-k">&gt;</span> [2223 lines of output]



[... the error is very long but not really relevant <span class="pl-k">for</span> scipy ...]



                assert len(base_version) == 2
            AssertionError
      
            <span class="pl-c"><span class="pl-c">#</span>########## EXT COMPILER OPTIMIZATION ###########</span>
            Platform      <span class="pl-c1">:</span>
              Architecture: aarch64
              Compiler    <span class="pl-c1">:</span> clang
      
            CPU baseline  <span class="pl-c1">:</span>
              Requested   <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">'</span>min<span class="pl-pds">'</span></span>
              Enabled     <span class="pl-c1">:</span> NEON NEON_FP16 NEON_VFPV4 ASIMD
              Flags       <span class="pl-c1">:</span> none
              Extra checks: none
      
            CPU dispatch  <span class="pl-c1">:</span>
              Requested   <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">'</span>max -xop -fma4<span class="pl-pds">'</span></span>
              Enabled     <span class="pl-c1">:</span> ASIMDHP ASIMDDP
              Generated   <span class="pl-c1">:</span>
                          <span class="pl-c1">:</span>
              ASIMDHP     <span class="pl-c1">:</span> NEON NEON_FP16 NEON_VFPV4 ASIMD
              Flags       <span class="pl-c1">:</span> -march=armv8.2-a+fp16
              Extra checks: none
              Detect      <span class="pl-c1">:</span> ASIMD ASIMDHP
                          <span class="pl-c1">:</span> numpy/core/src/umath/_umath_tests.dispatch.c
            CCompilerOpt._cache_write[796] <span class="pl-c1">:</span> write cache to path -<span class="pl-k">&gt;</span> /private/var/folders/3n/68py6wjs1t7dqlglcvwgvrcr0000gp/T/pip-install-pfa3d0mq/numpy_b0c1897da5564dec984ac45053f20aa5/build/temp.macosx-11-arm64-3.9/ccompiler_opt_cache_ext.py
      
            <span class="pl-c"><span class="pl-c">#</span>########## CLIB COMPILER OPTIMIZATION ###########</span>
            Platform      <span class="pl-c1">:</span>
              Architecture: aarch64
              Compiler    <span class="pl-c1">:</span> clang
      
            CPU baseline  <span class="pl-c1">:</span>
              Requested   <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">'</span>min<span class="pl-pds">'</span></span>
              Enabled     <span class="pl-c1">:</span> NEON NEON_FP16 NEON_VFPV4 ASIMD
              Flags       <span class="pl-c1">:</span> none
              Extra checks: none
      
            CPU dispatch  <span class="pl-c1">:</span>
              Requested   <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">'</span>max -xop -fma4<span class="pl-pds">'</span></span>
              Enabled     <span class="pl-c1">:</span> ASIMDHP ASIMDDP
              Generated   <span class="pl-c1">:</span> none
            CCompilerOpt._cache_write[796] <span class="pl-c1">:</span> write cache to path -<span class="pl-k">&gt;</span> /private/var/folders/3n/68py6wjs1t7dqlglcvwgvrcr0000gp/T/pip-install-pfa3d0mq/numpy_b0c1897da5564dec984ac45053f20aa5/build/temp.macosx-11-arm64-3.9/ccompiler_opt_cache_clib.py
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel <span class="pl-k">for</span> numpy
      Failed to build numpy
      ERROR: Could not build wheels <span class="pl-k">for</span> numpy, which is required to install pyproject.toml-based projects
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">scipy 1.8.0, numpy 1.22.3, python 3.9.9</p>
<p dir="auto">I'm trying to use pip to install scipy (python 3.10.2 and two different commands as visible in the terminal output) and I get a litany of errors instead of it actually installing. I don't quite know what more information would be desired - I'm on Big Sur on a 2020 M1 if that helps.</p>
<p dir="auto"><a href="https://github.com/scipy/scipy/files/8343493/Terminal.Saved.Output.txt">Terminal Saved Output.txt</a></p>