Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble installing on apple silicon M1 #13409

Closed
Tracked by #627
hkennyv opened this issue Jan 21, 2021 · 107 comments
Closed
Tracked by #627

trouble installing on apple silicon M1 #13409

hkennyv opened this issue Jan 21, 2021 · 107 comments
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS
Milestone

Comments

@hkennyv
Copy link

hkennyv commented Jan 21, 2021

EDIT: As of 2021-08-06, this solution seems to work for scipy 1.7.0 (native, not through rosetta):

brew install openblas
pip install cython pybind11 pythran numpy
OPENBLAS=$(brew --prefix openblas) CFLAGS="-falign-functions=8 ${CFLAGS}" pip install --no-use-pep517 scipy==1.7.0

Thanks goes to @lutzroder for the figuring out this solution

Hi there, I did not find any other issues related to this on here. I'm having some issues installing scipy on my M1 Macbook Air.

2020 Macbook Air M1
Mac OS Big Sur 11.0.1

khuynh@kmba:~ $ python3 --version
Python 3.9.1

Reproducing code example:

Install python3.9.1 on Mac OS through brew (natively, not x86):

brew install [email protected]

Install numpy (solution from this numpy issue):

OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install numpy --no-use-pep517

Install pandas and matplotlib

python3 -m pip install matplotlib pandas

Try to install scipy:

python3 -m pip install scipy

Error message:

Error output (after successfully installing numpy, pandas, matplotlib):

khuynh@kmba:~ $ python3 -m pip install scipy
Collecting scipy
  Using cached scipy-1.6.0.tar.gz (27.3 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/homebrew/opt/[email protected]/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-build-env-lm96mgjq/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel 'setuptools<=51.0.0' 'Cython>=0.29.18' 'numpy==1.16.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"'' 'numpy==1.19.3; python_version=='"'"'3.9'"'"'' 'numpy; python_version>='"'"'3.10'"'"'' 'pybind11>=2.4.3'
       cwd: None
  Complete output (226 lines):
  Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.8"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.10"' don't match your environment
  Collecting numpy==1.19.3
    Using cached numpy-1.19.3.zip (7.3 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 wheel metadata: started
      Preparing wheel metadata: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /opt/homebrew/opt/[email protected]/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/tmpbdr967n3
           cwd: /private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1
      Complete output (209 lines):
      Running from numpy source directory.
      setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
        run_build = parse_setuppy_commands()
      Processing numpy/random/_bounded_integers.pxd.in
      Processing numpy/random/_philox.pyx
      Processing numpy/random/_bounded_integers.pyx.in
      Processing numpy/random/_sfc64.pyx
      Processing numpy/random/_mt19937.pyx
      Processing numpy/random/bit_generator.pyx
      Processing numpy/random/mtrand.pyx
      Processing numpy/random/_generator.pyx
      Processing numpy/random/_pcg64.pyx
      Processing numpy/random/_common.pyx
      Cythonizing sources
      blas_opt_info:
      blas_mkl_info:
      customize UnixCCompiler
        libraries mkl_rt not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      blis_info:
        libraries blis not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      openblas_info:
        libraries openblas not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      atlas_3_10_blas_threads_info:
      Setting PTATLAS=ATLAS
        libraries tatlas not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      atlas_3_10_blas_info:
        libraries satlas not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      atlas_blas_threads_info:
      Setting PTATLAS=ATLAS
        libraries ptf77blas,ptcblas,atlas not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      atlas_blas_info:
        libraries f77blas,cblas,atlas not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      accelerate_info:
        libraries accelerate not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
      Library accelerate was not found. Ignoring
        libraries veclib not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
      Library veclib was not found. Ignoring
        FOUND:
          extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/vecLib.framework/Headers']
          extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
          define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]

        FOUND:
          extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/vecLib.framework/Headers']
          extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
          define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]

      non-existing path in 'numpy/distutils': 'site.cfg'
      lapack_opt_info:
      lapack_mkl_info:
        libraries mkl_rt not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      openblas_lapack_info:
        libraries openblas not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      openblas_clapack_info:
        libraries openblas,lapack not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      flame_info:
        libraries flame not found in ['/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
        NOT AVAILABLE

      atlas_3_10_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries tatlas,tatlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries lapack_atlas not found in /usr/local/lib
        libraries tatlas,tatlas not found in /usr/local/lib
        libraries lapack_atlas not found in /usr/lib
        libraries tatlas,tatlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
        NOT AVAILABLE

      atlas_3_10_info:
        libraries lapack_atlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries satlas,satlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries lapack_atlas not found in /usr/local/lib
        libraries satlas,satlas not found in /usr/local/lib
        libraries lapack_atlas not found in /usr/lib
        libraries satlas,satlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_3_10_info'>
        NOT AVAILABLE

      atlas_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries ptf77blas,ptcblas,atlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries lapack_atlas not found in /usr/local/lib
        libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
        libraries lapack_atlas not found in /usr/lib
        libraries ptf77blas,ptcblas,atlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_threads_info'>
        NOT AVAILABLE

      atlas_info:
        libraries lapack_atlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries f77blas,cblas,atlas not found in /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib
        libraries lapack_atlas not found in /usr/local/lib
        libraries f77blas,cblas,atlas not found in /usr/local/lib
        libraries lapack_atlas not found in /usr/lib
        libraries f77blas,cblas,atlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_info'>
        NOT AVAILABLE

        FOUND:
          extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/vecLib.framework/Headers']
          extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
          define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]

      /opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
        warnings.warn(msg)
      running dist_info
      running build_src
      build_src
      building py_modules sources
      creating build
      creating build/src.macosx-11-arm64-3.9
      creating build/src.macosx-11-arm64-3.9/numpy
      creating build/src.macosx-11-arm64-3.9/numpy/distutils
      building library "npymath" sources
      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
          main()
        File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-build-env-u2e50a1f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-build-env-u2e50a1f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-build-env-u2e50a1f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 508, in <module>
          setup_package()
        File "setup.py", line 500, in setup_package
          setup(**metadata)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/core.py", line 169, in setup
          return old_setup(**new_attr)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-build-env-u2e50a1f/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
          return distutils.core.setup(**attrs)
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-build-env-u2e50a1f/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py", line 31, in run
          egg_info.run()
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/command/egg_info.py", line 24, in run
          self.run_command("build_src")
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/command/build_src.py", line 144, in run
          self.build_sources()
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/command/build_src.py", line 155, in build_sources
          self.build_library_sources(*libname_info)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/command/build_src.py", line 288, in build_library_sources
          sources = self.generate_sources(sources, (lib_name, build_info))
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/command/build_src.py", line 378, in generate_sources
          source = func(extension, build_dir)
        File "numpy/core/setup.py", line 658, in get_mathlib_info
          st = config_cmd.try_link('int main(void) { return 0;}')
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/config.py", line 241, in try_link
          self._check_compiler()
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/command/config.py", line 80, in _check_compiler
          self.fcompiler = new_fcompiler(compiler=self.fcompiler,
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/__init__.py", line 880, in new_fcompiler
          compiler = get_default_fcompiler(plat, requiref90=requiref90,
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/__init__.py", line 851, in get_default_fcompiler
          compiler_type =  _find_existing_fcompiler(matching_compiler_types,
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/__init__.py", line 802, in _find_existing_fcompiler
          c.customize(dist)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/__init__.py", line 526, in customize
          linker_so_flags = self.flag_vars.linker_so
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/environment.py", line 37, in __getattr__
          return self._get_var(name, conf_desc)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/environment.py", line 53, in _get_var
          var = self._hook_handler(name, hook)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/__init__.py", line 705, in _environment_hook
          return hook()
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/gnu.py", line 346, in get_flags_linker_so
          flags = GnuFCompiler.get_flags_linker_so(self)
        File "/private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-install-rxxkdkwc/numpy_f22187e5fa894f3cab417c6a812e04c1/numpy/distutils/fcompiler/gnu.py", line 136, in get_flags_linker_so
          os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 684, in __setitem__
          value = self.encodevalue(value)
        File "/opt/homebrew/Cellar/[email protected]/3.9.1_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 756, in encode
          raise TypeError("str expected, not %s" % type(value).__name__)
      TypeError: str expected, not int
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /opt/homebrew/opt/[email protected]/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/tmpbdr967n3 Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/homebrew/opt/[email protected]/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-build-env-lm96mgjq/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel 'setuptools<=51.0.0' 'Cython>=0.29.18' 'numpy==1.16.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"'' 'numpy==1.19.3; python_version=='"'"'3.9'"'"'' 'numpy; python_version>='"'"'3.10'"'"'' 'pybind11>=2.4.3' Check the logs for full command output.

Scipy/Numpy/Python version information:

>>> import sys, numpy; print(numpy.__version__, sys.version_info)
1.19.5 sys.version_info(major=3, minor=9, micro=1, releaselevel='final', serial=0)
@zachbellay
Copy link

+1 I am experiencing the same issue.

@tylerjereddy tylerjereddy added the Build issues Issues with building from source, including different choices of architecture, compilers and OS label Jan 22, 2021
@vincentwi
Copy link

+1 the whole point of this new M1 mac is to do ML and scipy is pretty integral..

@hkennyv
Copy link
Author

hkennyv commented Jan 30, 2021

FWIW, I am able to get it to "install" now using the following:

$ pip install python
$ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install numpy --no-use-pep517
$ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install scipy --no-use-pep517

but i get a segmentation fault when doing most things

$ python
Python 3.9.1 (default, Jan  5 2021, 21:58:48)
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.integrate import quad
[1]    27600 segmentation fault  python

@pierreia
Copy link

pierreia commented Feb 3, 2021

FWIW, I am able to get it to "install" now using the following:

$ pip install python
$ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install numpy --no-use-pep517
$ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install scipy --no-use-pep517

but i get a segmentation fault when doing most things

$ python
Python 3.9.1 (default, Jan  5 2021, 21:58:48)
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.integrate import quad
[1]    27600 segmentation fault  python

Even with doing this, I'm not able to install scipy, I got an error. end of the error message:

[...]
  ########### CLIB COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: aarch64
    Compiler    : clang
  
  CPU baseline  :
    Requested   : 'min'
    Enabled     : none
    Flags       : none
    Extra checks: none
  
  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : none
    Generated   : none
  CCompilerOpt._cache_write[796] : write cache to path -> /private/var/folders/62/zym7btb12r3r0000gn/T/pip-install-sheso46s/scipy_e440212dfe094281888db6cf92b9cb53/build/temp.macosx-10.14.6-arm64-3.8/ccompiler_opt_cache_clib.py
  ----------------------------------------
ERROR: Command errored out with exit status 1: 
[...]

@ilayn
Copy link
Member

ilayn commented Feb 3, 2021

Yes we are still trying to figure out how to compile on that architecture. Many people tried alternative ways to do it but got limited success. We'll keep this post up to date when we have more info.

Just FYI, the actual error is slightly earlier in the snipped part of the logs

@lutzroeder
Copy link

lutzroeder commented Feb 7, 2021

Workaround building from source:

/opt/homebrew/bin/brew install openblas
export OPENBLAS=$(/opt/homebrew/bin/brew --prefix openblas)
export CFLAGS="-falign-functions=8 ${CFLAGS}"
git clone https://github.com/scipy/scipy.git
cd scipy
/opt/homebrew/bin/pip install .

lutzroeder added a commit to lutzroeder/netron that referenced this issue Feb 7, 2021
@huwei1024
Copy link

@lutzroeder
Hi , I got this error:

numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. Note: Accelerate is no longer supported.
To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
See site.cfg.example in the Scipy source directory and
https://docs.scipy.org/doc/scipy/reference/building/index.html for details.

@lutzroeder
Copy link

lutzroeder commented Feb 9, 2021

@huwei1024 are you running the arm64 version of brew to install openblas and Python arm64.

~: /opt/homebrew/bin/brew --version
Homebrew 3.0.0
Homebrew/homebrew-core (git revision cdf6a3; last commit 2021-02-09)
Homebrew/homebrew-cask (git revision e65146; last commit 2021-02-09)
~: /opt/homebrew/bin/pip --version
pip 21.0.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)
~: file /opt/homebrew/bin/python3
/opt/homebrew/bin/python3: Mach-O 64-bit executable arm64

@huwei1024
Copy link

yes, i think so.

Homebrew 3.0.0-35-g78f54b0-dirty

@huwei1024
Copy link

huwei@HuweideMBP-2 scipy % /opt/homebrew/bin/brew --version
Homebrew 3.0.0-35-g78f54b0-dirty
Homebrew/homebrew-core (git revision 2dcaa6; last commit 2021-02-08)
Homebrew/homebrew-cask (git revision 752b7; last commit 2021-02-08)

huwei@HuweideMBP-2 scipy % /usr/local/bin/pip3.9 --version
pip 21.0.1 from /Users/huwei/.local/lib/python3.9/site-packages/pip (python 3.9)

huwei@HuweideMBP-2 scipy % file /usr/local/bin/python3
/usr/local/bin/python3: Mach-O 64-bit executable arm64

@hkennyv
Copy link
Author

hkennyv commented Feb 9, 2021

i can confirm @lutzroeder's method was successful on my machine (MBA M1) 🎉. I also no longer get a segmentation fault when doing some things (see my previous comment).

(this is all native, not x86_64 emulated under rosetta)

khuynh@kmba:temp/scipy ‹master›$ OPENBLAS=$(brew --prefix openblas) CFLAGS="-falign-functions=8 ${CFLAGS}" pip install .
Processing /Users/khuynh/me/develop/temp/scipy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.16.5 in /Users/khuynh/.pyenv/versions/3.9.1/lib/python3.9/site-packages (from scipy==1.7.0.dev0+05ce902) (1.20.0)
Building wheels for collected packages: scipy
  Building wheel for scipy (PEP 517) ... done
  Created wheel for scipy: filename=scipy-1.7.0.dev0+05ce902-cp39-cp39-macosx_11_0_arm64.whl size=18775040 sha256=799488d6e2104d11157c57bd659e48253ba2bacc5326955bd1d0e5301a45057e
  Stored in directory: /private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-ephem-wheel-cache-90wyixpz/wheels/8c/c5/0e/f008d3e2cafdbfa0cbfbc9bce17c46d5dbca5079f87c36b380
Successfully built scipy
Installing collected packages: scipy
Successfully installed scipy-1.7.0.dev0+05ce902
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the '/Users/khuynh/.pyenv/versions/3.9.1/bin/python3.9 -m pip install --upgrade pip' command.
khuynh@kmba:temp/scipy ‹master›$
khuynh@kmba:temp/scipy ‹master›$ brew --version
Homebrew 3.0.0
Homebrew/homebrew-core (git revision ec6259; last commit 2021-02-06)
Homebrew/homebrew-cask (git revision 6e099; last commit 2021-02-06)
khuynh@kmba:temp/scipy ‹master›$ python3 --version
Python 3.9.1

@pierreia
Copy link

pierreia commented Feb 9, 2021

i can confirm @lutzroeder's method was successful on my machine (MBA M1) 🎉. I also no longer get a segmentation fault when doing some things (see my previous comment).

(this is all native, not x86_64 emulated under rosetta)

khuynh@kmba:temp/scipy ‹master›$ OPENBLAS=$(brew --prefix openblas) CFLAGS="-falign-functions=8 ${CFLAGS}" pip install .
Processing /Users/khuynh/me/develop/temp/scipy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.16.5 in /Users/khuynh/.pyenv/versions/3.9.1/lib/python3.9/site-packages (from scipy==1.7.0.dev0+05ce902) (1.20.0)
Building wheels for collected packages: scipy
  Building wheel for scipy (PEP 517) ... done
  Created wheel for scipy: filename=scipy-1.7.0.dev0+05ce902-cp39-cp39-macosx_11_0_arm64.whl size=18775040 sha256=799488d6e2104d11157c57bd659e48253ba2bacc5326955bd1d0e5301a45057e
  Stored in directory: /private/var/folders/jc/hrnrv7f1059b2dx2kvsf4wk80000gn/T/pip-ephem-wheel-cache-90wyixpz/wheels/8c/c5/0e/f008d3e2cafdbfa0cbfbc9bce17c46d5dbca5079f87c36b380
Successfully built scipy
Installing collected packages: scipy
Successfully installed scipy-1.7.0.dev0+05ce902
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the '/Users/khuynh/.pyenv/versions/3.9.1/bin/python3.9 -m pip install --upgrade pip' command.
khuynh@kmba:temp/scipy ‹master›$
khuynh@kmba:temp/scipy ‹master›$ brew --version
Homebrew 3.0.0
Homebrew/homebrew-core (git revision ec6259; last commit 2021-02-06)
Homebrew/homebrew-cask (git revision 6e099; last commit 2021-02-06)
khuynh@kmba:temp/scipy ‹master›$ python3 --version
Python 3.9.1

still got an error on my M1 MBP... I use a virtual env with tensorflow for mac os.
EDIT: I wonder this is because I do not user python from homebrew. Any idea about this? I use python from xcode

@pietmlr
Copy link

pietmlr commented Feb 12, 2021

Hey,
I'm not able to install it using @lutzroeder 's method. I get the following error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: An exception occurred within a child process:
  CompilerSelectionError: gcc cannot be built with any available compilers.
Install GNU's GCC:
  brew install gcc

Also brew install gcc don't work either

@lingwhatics
Copy link

@redmlr Did you recently update MacOS? If so, you need to re-install CommandLineTools for each point update.
xcode-select --install

I could get SciPy to install with @lutzroeder's method, but still get the segfault when I import it.

@pietmlr
Copy link

pietmlr commented Feb 14, 2021

@lingwhatics Yes you were right, I installed Xcode-CommandLineTools again, but after following the steps, an error occurred while building the wheel.

ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly

My command before the error was: (tensorM1) me@Air-von-me scipy % pip install . because I need scipy in a Conda environment.
My macOS version is: 11.2.1

@pierreia
Copy link

@lingwhatics Yes you were right, I installed Xcode-CommandLineTools again, but after following the steps, an error occurred while building the wheel.

ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly

My command before the error was: (tensorM1) me@Air-von-me scipy % pip install . because I need scipy in a Conda environment.
My macOS version is: 11.2.1

you can try pip install . --no-use-pep-517
However i still got an other error with using this.

@hkennyv
Copy link
Author

hkennyv commented Feb 14, 2021

@redmlr i believe conda already provides native-built wheels through mini forge. See this comment on the relevant numpy issue.

@andyfaff
Copy link
Contributor

From a maintainer perspective I'd like to express my sympathy for all the difficulties going on in this thread. There are a lot of scipy maintainers that use macOS for their work (including me), and we're very much interested in stability and functionality for the macOS platform.
However at the moment (at least in my own case), solving these M1 related issues is difficult. Many of the maintainers won't possess machines of this type, or even have the most up to date OS installed. Moreover, the continuous integration platforms that are available don't offer the ability to test on this type of setup. This severely limits our ability to solve these issues, limiting our help to back-and-forth messaging with users who do have these setups. Thank you for being patient in this area, we'll eventually get through this period of difficulty.

@pietmlr
Copy link

pietmlr commented Feb 15, 2021

@redmlr i believe conda already provides native-built wheels through mini forge. See this comment on the relevant numpy issue.

@hkennyv I'm already using a mini forge environment to run M1 accelerated TensorFlow

@hkennyv
Copy link
Author

hkennyv commented Feb 15, 2021

@redmlr are you able to install scipy through conda instead of pip?

Edit: @climatebrad corrected me, it is miniforge that has the working pre-built wheels. Thank you!

@climatebrad
Copy link

climatebrad commented Feb 16, 2021

Note that it's not the Anaconda-distributed conda that works but the community-driven miniforge project from conda-forge that works on aarch64. e.g. https://formulae.brew.sh/cask/miniforge

@DavidY0903
Copy link

Anyone here is using m1 and able to install scipy but when using import statement in the code, it yields error " ModuleNotFoundError: No module named 'scipy' "? Thank you. Please help to import in the code.

@rgommers
Copy link
Member

@DavidY0903 that is unrelated to this issue, please open a new one instead. Note that you do need to give many more details about the exact steps you took, how you installed Python, SciPy itself, etc. - this is highly likely to be a simple user error.

@jmoz
Copy link

jmoz commented Jan 25, 2022

Got it to work on Mac m1. Must use native terminal (not rosetta).

brew install openblas
export OPENBLAS=$(/opt/homebrew/bin/brew --prefix openblas)
export CFLAGS="-falign-functions=8 ${CFLAGS}"
pip3 install scipy

Full details:

➜  ~ brew install openblas
==> Downloading https://ghcr.io/v2/homebrew/core/openblas/manifests/0.3.19
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/b47e3d834a9c52d0772b21372a675e3496a8480baa2f3e9b72d60def08682c3f--openblas-0.3.19.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/openblas/blobs/sha256:33e6385102e69ddd716d8eb818861e2e2e2c08de20e06d189ffd69115131ed03
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/82003eb6c8dd0091f8465e8203b39d67e81d7db4c9e4d790e71f6b2e8445ab3f--openblas--0.3.19.arm64_big_sur.bottle.tar.gz
==> Pouring openblas--0.3.19.arm64_big_sur.bottle.tar.gz
==> Caveats
openblas is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides BLAS in Accelerate.framework.

For compilers to find openblas you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/openblas/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/openblas/include"

==> Summary
🍺  /opt/homebrew/Cellar/openblas/0.3.19: 23 files, 51.9MB
==> Running `brew cleanup openblas`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
➜  ~ export OPENBLAS=$(/opt/homebrew/bin/brew --prefix openblas)
➜  ~ export CFLAGS="-falign-functions=8 ${CFLAGS}"
➜  ~ pip3 install scipy
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting scipy
  Using cached scipy-1.7.3.tar.gz (36.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy<1.23.0,>=1.16.5 in /opt/homebrew/lib/python3.9/site-packages (from scipy) (1.22.1)
Building wheels for collected packages: scipy
  Building wheel for scipy (pyproject.toml) ... done
  Created wheel for scipy: filename=scipy-1.7.3-cp39-cp39-macosx_11_0_arm64.whl size=19262572 sha256=99eedcf14a75cf7b0939a532b61e14053cf3d01281b9729285d3bb45b77417d5
  Stored in directory: /Users/x/Library/Caches/pip/wheels/db/b0/52/cd8694e58492f87ea39e66b94e989640ad743667557a523ac1
Successfully built scipy
Installing collected packages: scipy
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed scipy-1.7.3```

@zhouaad
Copy link

zhouaad commented Feb 8, 2022

Anyone here is using m1 and able to install scipy but when using import statement in the code, it yields error " ModuleNotFoundError: No module named 'scipy' "? Thank you. Please help to import in the code.

Did you solve the problem? I am also having this issue when I am trying to import Scipy

@danieltomasz
Copy link

danieltomasz commented Feb 8, 2022

@zhouaad Are you sure thay you are installed scipy to the same environment you are running? Python installed by brew is different than the one shipped by default by Apple

After installing pip install -U scipy are you able start ipython in the same terminal and check if import scipy work in interactive comandline?

@zhouaad
Copy link

zhouaad commented Feb 8, 2022

@zhouaad Are you sure thay you are installed scipy to the same environment you are running? Python installed by brew is different than the one shipped by default by Apple

After installing pip install -U scipy are you able start ipython in the same terminal and check if import scipy work in interactive comandline?

I guess that's what I'm trying to figure out. When I pip3 list, scipy does show up, but when I import scipy in idle, it says ModuleNotFoundError: No module named 'scipy'

@danieltomasz
Copy link

try

which -a python
$(which -a python) -m pip install scipy

@zhouaad
Copy link

zhouaad commented Feb 8, 2022

try

which -a python
$(which -a python) -m pip install scipy

which -a python outputs
/opt/anaconda3/bin/python /Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/local/bin/python /usr/bin/python
(which -a python) -m pip install scipy throws an error -bash: syntax error near unexpected token -m' The Python version I have on my laptop is 3.10

@psobolewskiPhD
Copy link

Woof. My advice would be to get up and running with something to manage python environments. If you're on M1, then I'd suggest the miniforge install of conda:
https://github.com/conda-forge/miniforge

Just remember to activate you envs before you install stuff!
And if you screw up your env, just delete it and start over.

Also, python 3.10 in my experience isn't hugely supported, so I'd stick to 3.9 for the time being—which again, conda or another env manager makes easy.

@danieltomasz
Copy link

which -a python outputs /opt/anaconda3/bin/python /Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/local/bin/python /usr/bin/python (which -a python) -m pip install scipy throws an error -bash: syntax error near unexpected token -m' The Python version I have on my laptop is 3.10

Did you copy $ in $(which -a python) -m pip install scipy?
Try to start idle in the same console, if you run idle from spotlight it might use the python that was shipped with your sytem (3.8 or 3.9)

Check if you could import scipy in idle started using both commands

/opt/anaconda3/bin/python -m  idlelib.idle
python -m idlelib.idle

@nico-medellin
Copy link

pip install cython pybind11 pythran numpy
OPENBLAS=$(brew --prefix openblas) CFLAGS="-falign-functions=8 ${CFLAGS}" pip install --no-use-pep517 scipy==1.7.0

I was having issues with Wheels so I had to pip install wheel before I ran the code above but I got that to work!

@nicolasgrasset
Copy link

There are a few partial solutions above, but it in putting all of them together that I finally got this to work on Python 3.9.13, macOS 12.3 Monterey

# Install BLAS and LAPACK
brew info openblas lapack

# FLAGS
export LDFLAGS="-L/opt/homebrew/opt/lapack/lib"
export CPPFLAGS="-I/opt/homebrew/opt/lapack/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/lapack/lib/pkgconfig"
export NPY_DISTUTILS_APPEND_FLAGS=1
export SYSTEM_VERSION_COMPAT=1
export CFLAGS="-falign-functions=8"

# Libraries
export LAPACK=/opt/homebrew/opt/lapack/lib/liblapack.dylib
export BLAS=/opt/homebrew/opt/openblas/lib/libopenblas.dylib

# Install on system or in venv
pip install cython pybind11 pythran
pip install numpy
pip install --no-use-pep517 scipy

For reference:

~ % python
Python 3.9.13 (main, May 24 2022, 21:13:51)
[Clang 13.1.6 (clang-1316.0.21.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> scipy.version.full_version
'1.8.1'

~ % file $(which python)
/opt/homebrew/opt/[email protected]/libexec/bin/python: Mach-O 64-bit executable arm64

@rgommers
Copy link
Member

rgommers commented Jun 1, 2022

This continues to get traction for some reason, so let me just say that none of these workarounds or using env vars are needed anymore. The contributor docs are up to date: http://scipy.github.io/devdocs/dev/dev_quickstart.html, and it's literally 2-3 commands to build/install on macOS M1, and there are no known issues.

@aiell0
Copy link

aiell0 commented Jun 12, 2022

@rgommers I followed the document you linked and it was not enough to get my environment working. @nicolasgrasset's post finally resolved my issues and I was able to get it building on my machine.

@rgommers
Copy link
Member

@aiell0 can you please open a new issue with what you are seeing when following that link, and Cc me? All known problems are fixed, so if you see a new problem it needs fixing. Maybe something is still screwed up specifically in Homebrew or some such thing.

@dancaron
Copy link

dancaron commented Aug 1, 2022

Got scipy to install using a variant of @nicolasgrasset solution. Unfortunately, @rgommers your document didn't solve my issue. However, exporting these paths did. OSX 11.1. Python 3.9.5. M1 native. Scipy 1.9.0.

Install openblas

brew install openblas

Install additional dependencies

pip install cython pybind11 pythran
pip install numpy

Get paths that are required to be set in environment

brew info openblas

openblas: stable 0.3.20 (bottled), HEAD [keg-only]
...
For compilers to find openblas you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/openblas/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/openblas/include"

For pkg-config to find openblas you may need to set:
  export PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig"

Execute the above three export statements in your terminal

pip install scipy
Successfully built scipy
Installing collected packages: scipy
Successfully installed scipy-1.9.0

Original error

pip install scipy                
Collecting scipy
  Using cached scipy-1.9.0.tar.gz (42.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      ld: warning: directory not found for option '-L/opt/homebrew/opt/lapack/lib'
      The Meson build system
      Version: 0.62.2
      Source dir: /private/var/folders/bq/mzk4g8qs4jz3vcr1s9zq2s0h0000gn/T/pip-install-jcsyla8a/scipy_da7be2f1bf954b5bb4883a1e3bdbdd19
      Build dir: /private/var/folders/bq/mzk4g8qs4jz3vcr1s9zq2s0h0000gn/T/pip-install-jcsyla8a/scipy_da7be2f1bf954b5bb4883a1e3bdbdd19/.mesonpy-5tm2xxfa/build
      Build type: native build
      Project name: SciPy
      Project version: 1.9.0
      C compiler for the host machine: cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.9)")
      C linker for the host machine: cc ld64 650.9
      C++ compiler for the host machine: c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.9)")
      C++ linker for the host machine: c++ ld64 650.9
      Host machine cpu family: aarch64
      Host machine cpu: arm64
      Compiler for C supports arguments -Wno-unused-but-set-variable: NO
      Library m found: YES
      Fortran compiler for the host machine: gfortran (gcc 11.3.0 "GNU Fortran (Homebrew GCC 11.3.0_2) 11.3.0")
      Fortran linker for the host machine: gfortran ld64 650.9
      Program cython found: YES (/private/var/folders/bq/mzk4g8qs4jz3vcr1s9zq2s0h0000gn/T/pip-build-env-io98cose/overlay/bin/cython)
      Program pythran found: YES (/private/var/folders/bq/mzk4g8qs4jz3vcr1s9zq2s0h0000gn/T/pip-build-env-io98cose/overlay/bin/pythran)
      Program cp found: YES (/bin/cp)
      Program python3 found: YES (/Users/dancaron/Dropbox/git/nextgenerative/mini/bin/python)
      Found pkg-config: /opt/homebrew/bin/pkg-config (0.29.2)
      Library npymath found: YES
      Library npyrandom found: YES
      Did not find CMake 'cmake'
      Found CMake: NO
      Run-time dependency openblas found: NO (tried pkgconfig and framework)
      
      ../../scipy/meson.build:120:0: ERROR: Dependency "openblas" not found, tried pkgconfig and framework
   ...
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel 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.

@eli-schwartz
Copy link
Contributor

eli-schwartz commented Aug 1, 2022

Execute the above three export statements in your terminal

The only one you need is PKG_CONFIG_PATH, by the way.

"For pkg-config to find openblas you may need to set:" -- and Meson / SciPy uses pkg-config here.

@dancaron
Copy link

dancaron commented Aug 1, 2022

@eli-schwartz Ah yes, that makes sense.

@drizham
Copy link

drizham commented Aug 13, 2022

REF: https://stackoverflow.com/a/69710042/3307521:
This one line below installs scypy directly
pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy

@Kumudaya
Copy link

REF: https://stackoverflow.com/a/69710042/3307521: This one line below installs scypy directly pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy

This absolutely solved the issue! Thanks

@emeryberger
Copy link

None of these solutions are currently working on my M1 running Python 3.11 :(.

@rgommers
Copy link
Member

pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy

There are wheels on PyPI, so a regular pip install scipy will do, no need for nightlies.

None of these solutions are currently working on my M1 running Python 3.11 :(.

This is not a useful bug report. You are trying to build from source (because there are no 3.11 packages just yet - they will arrive soon). Building from source does work fine, but you are probably missing a dependency. Please open a new bug report with exactly what you did and the build log showing the error you are seeing (feel free to Cc me).

@rgommers
Copy link
Member

This issue has stopped being useful, it's just a grab bag of comments for wheels and conda packages, plus building from source in various configs.

I will lock this issue here. If you do have a new problem not solved by the docs for building from source, please open a new and complete issue so we can help you. And as always, please use binaries unless you really do need to build from source!

@scipy scipy locked as resolved and limited conversation to collaborators Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS
Projects
None yet
Development

No branches or pull requests