bytedance / bytedance/InfiniteYou

Fatal "cmath file not found" error upon MacOS installation

Open
#44 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.7k
Forks
285
PR merge metrics
No merged PRs in 30d

Description

### 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
| ^~~~~~~
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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with requirements.txt and the insightface third-party face3d mesh extension named in the build output, then reproduce the installation on macOS Sequoia with Python 3.11. Identify why the C++ extension cannot find cmath and verify that requirements installation completes successfully in the reported environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos, python
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.