arunavabasucom / radis-app

A web app for high-resolution infrared molecular spectra using RADIS
https://radis.app
GNU Lesser General Public License v3.0
11 stars 15 forks source link

Bug Report: Installation fails on M1 Macs #683

Closed kevinmonisit closed 1 year ago

kevinmonisit commented 1 year ago

🐛 Describe the bug

Specifications: MacOS Ventura 13.0 Macbook Pro, M1 Python 3.9.2 Pip 23.0.1

When running the command pip3 install -r requirements.txt, I will get the following error:

  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
  ╰─> [10 lines of output]
      ld: library not found for -lhdf5
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      cpuinfo failed, assuming no CPU features: 'flags'
      * Using Python 3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:08:59)
      * Found cython 0.29.33
      * USE_PKGCONFIG: True
      .. ERROR:: Could not find a local HDF5 installation.
         You may need to explicitly state where your local HDF5 headers and
         library can be found by setting the ``HDF5_DIR`` environment
         variable or by using the ``--hdf5`` command-line option.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

💡 Possible solutions

This is a common issue with M1 macs. The following solution helped.

brew install hdf5
export HDF5_DIR=/opt/homebrew/opt/hdf5 
export BLOSC_DIR=/opt/homebrew/opt/c-blosc

This could be useful for anyone who is trying to run radis-app on their M1 macs.

Browser

None

kevinmonisit commented 1 year ago

I got the solution from here: https://stackoverflow.com/questions/73029883/could-not-find-hdf5-installation-for-pytables-on-m1-mac