Skip to content

Fatal "cmath file not found" error upon MacOS installation #44

@justinmayer

Description

@justinmayer

Steps to reproduce

  1. Create Python 3.11 virtual environment and activate it.
  2. Clone the repo: git clone https://github.com/bytedance/InfiniteYou
  3. Install the requirements: python -m pip install -r requirements.txt

Error output

[…]
      running build_ext
      building 'insightface.thirdparty.face3d.mesh.cython.mesh_core_cython' extension
      creating build/temp.macosx-11.0-arm64-cpython-311/insightface/thirdparty/face3d/mesh/cython
      c++ -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -Iinsightface/thirdparty/face3d/mesh/cython -I/private/var/folders/r7/xxdlb6114759yn1rltsq8nwh0000gn/T/pip-build-env-52fbeifs/overlay/lib/python3.11/site-packages/numpy/_core/include -I/Users/jm/.virtualenvs/tempenv-536f314290f2c/include -I/Users/jm/.local/share/mise/installs/python/3.11.13/include/python3.11 -c insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp -o build/temp.macosx-11.0-arm64-cpython-311/insightface/thirdparty/face3d/mesh/cython/mesh_core.o
      In file included from insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp:11:
      insightface/thirdparty/face3d/mesh/cython/mesh_core.h:5:10: fatal error: 'cmath' file not found
          5 | #include <cmath>
            |          ^~~~~~~
      1 error generated.
      error: command '/usr/bin/c++' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for insightface

Environment

  • MacOS Sequoia 15.5 on M3 Ultra Mac Studio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions