"getting requirement to build wheel error " when trying to install pillow , seaborn

Viewed 678

The output shows

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] The Meson build system Version: 0.62.2 Source dir: /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411 Build dir: /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/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.11)") 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.11)") 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

  ../../meson.build:41:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['g95']]
  The following exception(s) were encountered:
  Running "gfortran --version" gave "[Errno 2] No such file or directory: 'gfortran'"
  Running "gfortran -V" gave "[Errno 2] No such file or directory: 'gfortran'"
  Running "flang --version" gave "[Errno 2] No such file or directory: 'flang'"
  Running "flang -V" gave "[Errno 2] No such file or directory: 'flang'"
  Running "nvfortran --version" gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running "nvfortran -V" gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running "pgfortran --version" gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running "pgfortran -V" gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running "ifort --version" gave "[Errno 2] No such file or directory: 'ifort'"
  Running "ifort -V" gave "[Errno 2] No such file or directory: 'ifort'"
  Running "g95 --version" gave "[Errno 2] No such file or directory: 'g95'"
  Running "g95 -V" gave "[Errno 2] No such file or directory: 'g95'"
  
  A full log can be found at /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build/meson-logs/meson-log.txt
  + meson setup --native-file=/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/Library/Frameworks/Python.framework/Versions/3.10 /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411 /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build
  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 363, 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 345, 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 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 909, in get_requires_for_build_wheel
      with _project(config_settings) as project:
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
      return next(self.gen)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 888, in _project
      with Project.with_temp_working_dir(
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
      return next(self.gen)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 547, in with_temp_working_dir
      yield cls(source_dir, tmpdir, build_dir)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 463, in __init__
      self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 494, in _configure
      self._meson(
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 477, in _meson
      return self._proc('meson', *args)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 472, in _proc
      subprocess.check_call(list(args))
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=/Library/Frameworks/Python.framework/Versions/3.10', '/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411', '/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build']' returned non-zero exit status 1.
  [end of output]

How should i fix it ?

1 Answers

It seems that you are missing gfortran a fortran compiler nesscary for installing scipy. Try installing gfortran from here.

If that doesn't help, you can install scipy from wheel here. Then run pip install filename.whl to install the package.

Or try a different installation method listed on scipy's website.

Related