Re: [installation] troubles installing scipy on M1 Mac with python 3.10

Ralf Gommers <[email protected]> Wed, 13 Oct 2021 10:42:55 +0200
Newsgroups gmane.comp.python.scientific.user
Message-ID <CABL7CQiO2tefEb32vfQ+xkF8S2UFJ6X2Y_Uv2Cspwb-oLjXZ4A@mail.gmail.com>
On Wed, Oct 13, 2021 at 9:18 AM <[email protected]> wrote:

> hi, I am using a Mac book air M1, Where is installed Python 3.10.
> I am not able to install SciPy with the command
>
> python3 -m pip install scipy
>

Please install from the SciPy master branch, until the next release comes
out. 1.7.1 or earlier do not support Python 3.10 or macOS arm64.

Ralf



> That give me this error:
>
> Collecting scipy
>   Using cached scipy-1.6.1.tar.gz (27.3 MB)
>   Installing build dependencies ... done
>   Getting requirements to build wheel ... done
>   Preparing wheel metadata (pyproject.toml) ... error
>   ERROR: Command errored out with exit status 1:
>    command: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3
> /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py
> prepare_metadata_for_build_wheel
> /var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/tmpycf4rz1z
>        cwd:
> /private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-install-16fimo5m/scipy_a848fbf1084441eb9c80507d478e1152
>   Complete output (104 lines):
>   setup.py:461: UserWarning: Unrecognized setuptools command ('dist_info
> --egg-base
> /private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-modern-metadata-c3fs2ro3'),
> proceeding with generating Cython sources and expanding templates
>     warnings.warn("Unrecognized setuptools command ('{}'), proceeding with
> "
>   Running from SciPy source directory.
>   lapack_opt_info:
>   lapack_mkl_info:
>   customize UnixCCompiler
>     libraries mkl_rt not found in
> ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
>     NOT AVAILABLE
>
>   openblas_lapack_info:
>     libraries openblas not found in
> ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
>     NOT AVAILABLE
>
>   openblas_clapack_info:
>     libraries openblas,lapack not found in
> ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
>     NOT AVAILABLE
>
>   flame_info:
>     libraries flame not found in
> ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
>     NOT AVAILABLE
>
>   accelerate_info:
>     NOT AVAILABLE
>
>   atlas_3_10_threads_info:
>   Setting PTATLAS=ATLAS
>     libraries lapack_atlas not found in
> /Library/Frameworks/Python.framework/Versions/3.10/lib
>     libraries tatlas,tatlas not found in
> /Library/Frameworks/Python.framework/Versions/3.10/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
> /Library/Frameworks/Python.framework/Versions/3.10/lib
>     libraries satlas,satlas not found in
> /Library/Frameworks/Python.framework/Versions/3.10/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
> /Library/Frameworks/Python.framework/Versions/3.10/lib
>     libraries ptf77blas,ptcblas,atlas not found in
> /Library/Frameworks/Python.framework/Versions/3.10/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
> /Library/Frameworks/Python.framework/Versions/3.10/lib
>     libraries f77blas,cblas,atlas not found in
> /Library/Frameworks/Python.framework/Versions/3.10/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
>
>   lapack_info:
>     libraries lapack not found in
> ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
>     NOT AVAILABLE
>
>
> /private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-build-env-pk9zlbp7/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1858:
> UserWarning:
>       Lapack (http://www.netlib.org/lapack/) libraries not found.
>       Directories to search for the libraries can be specified in the
>       numpy/distutils/site.cfg file (section [lapack]) or by setting
>       the LAPACK environment variable.
>     return getattr(self, '_calc_info_{}'.format(name))()
>   lapack_src_info:
>     NOT AVAILABLE
>
>
> /private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-build-env-pk9zlbp7/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1858:
> UserWarning:
>       Lapack (http://www.netlib.org/lapack/) sources not found.
>       Directories to search for the sources can be specified in the
>       numpy/distutils/site.cfg file (section [lapack_src]) or by setting
>       the LAPACK_SRC environment variable.
>     return getattr(self, '_calc_info_{}'.format(name))()
>     NOT AVAILABLE
>
>   Traceback (most recent call last):
>     File
> "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py",
> line 349, in <module>
>       main()
>     File
> "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py",
> line 331, in main
>       json_out['return_val'] = hook(**hook_input['kwargs'])
>     File
> "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py",
> line 151, in prepare_metadata_for_build_wheel
>       return hook(metadata_directory, config_settings)
>     File
> "/private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-build-env-pk9zlbp7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py",
> line 161, in prepare_metadata_for_build_wheel
>       self.run_setup()
>     File
> "/private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-build-env-pk9zlbp7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py",
> line 253, in run_setup
>       super(_BuildMetaLegacyBackend,
>     File
> "/private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-build-env-pk9zlbp7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py",
> line 145, in run_setup
>       exec(compile(code, __file__, 'exec'), locals())
>     File "setup.py", line 588, in <module>
>       setup_package()
>     File "setup.py", line 584, in setup_package
>       setup(**metadata)
>     File
> "/private/var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/pip-build-env-pk9zlbp7/overlay/lib/python3.10/site-packages/numpy/distutils/core.py",
> line 135, in setup
>       config = configuration()
>     File "setup.py", line 499, in configuration
>       raise NotFoundError(msg)
>   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.
>   ----------------------------------------
> WARNING: Discarding
> https://files.pythonhosted.org/packages/26/68/84dbe18583e79e56e4cee8d00232a8dd7d4ae33bc3acf3be1c347991848f/scipy-1.6.1.tar.gz#sha256=c4fceb864890b6168e79b0e714c585dbe2fd4222768ee90bc1aa0f8218691b11
> (from https://pypi.org/simple/scipy/) (requires-python:>=3.7). Command
> errored out with exit status 1:
> /Library/Frameworks/Python.framework/Versions/3.10/bin/python3
> /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py
> prepare_metadata_for_build_wheel
> /var/folders/n0/r8n34lk526q8h3g5zp2t0mvh0000gn/T/tmpycf4rz1z Check the logs
> for full command output.
>   Using cached scipy-1.6.0.tar.gz (27.3 MB)
>   Installing build dependencies ... -^Z
>
> I also tried to install scipy from source, with the commands:
>
> git clone https://github.com/scipy/scipy.git
> cd scipy
> python3 setup.py build
>
> but also here it give me an error.
>
> How can I achieve the installation of scipy? Thanks
> _______________________________________________
> SciPy-User mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/scipy-user.python.org/
> Member address: [email protected]
>

_______________________________________________
SciPy-User mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-user.python.org/
Member address: [email protected]