First time here? Checkout the FAQ!
0 votes
by (3.4k points)

I ran into an error when installing carputils on macOS Monterey 12.3.1, using Python 3.10.

The error is not directly linked with carputils, but occurs when trying to install the Python package tables.

Collecting tables>=3.6.1
  Using cached tables-3.7.0.tar.gz (8.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error


  × Getting requirements to build wheel did not run successfully.
   exit code: 1
  ╰─> [12 lines of output]
      /var/folders/xj/qrlq0tbd1vn2b7_6kt_1sx8c000k4j/T/H5close9x08b1xl.c:2:5: error: implicit declaration of function 'H5close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      1 error generated.
      cpuinfo failed, assuming no CPU features: No module named 'cpuinfo'
      * Using Python 3.10.5 (v3.10.5:f377153967, Jun  6 2022, 12:36:10) [Clang 13.0.0 (clang-1300.0.29.30)]
      * Found cython 0.29.30
      * USE_PKGCONFIG: False
      .. 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.

The installation of tables fails if HDF5 is not available on the system. See the answer above for a solution that worked for me. 

1 Answer

0 votes
by (3.4k points)
Best answer

I am using Homebrew as a package manager and could get HDF5 using:

brew install hdf5

This was yet not sufficient for carputils to find the HDF5 library, so I had to run (to be adapted to the location of your HDF5 directory)

export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.12.2

From the carputils directory, I was then able to install carputils (and its dependencies) with

python3 -m pip install .

Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance