Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install insightface on Mac #2493

Open
truongkhaihoa1995 opened this issue Dec 16, 2023 · 8 comments
Open

Cannot install insightface on Mac #2493

truongkhaihoa1995 opened this issue Dec 16, 2023 · 8 comments

Comments

@truongkhaihoa1995
Copy link

Collecting insightface
Using cached insightface-0.7.3.tar.gz (439 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: numpy in ./venv/lib/python3.9/site-packages (from insightface) (1.26.2)
Collecting onnx (from insightface)
Obtaining dependency information for onnx from https://files.pythonhosted.org/packages/b8/a2/bb36f3aac8b2c38cbdd4ffbd3a124ec8aad882481251800b79c85151f698/onnx-1.15.0-cp39-cp39-macosx_10_12_universal2.whl.metadata
Downloading onnx-1.15.0-cp39-cp39-macosx_10_12_universal2.whl.metadata (15 kB)
Collecting tqdm (from insightface)
Obtaining dependency information for tqdm from https://files.pythonhosted.org/packages/00/e5/f12a80907d0884e6dff9c16d0c0114d81b8cd07dc3ae54c5e962cc83037e/tqdm-4.66.1-py3-none-any.whl.metadata
Using cached tqdm-4.66.1-py3-none-any.whl.metadata (57 kB)
Collecting requests (from insightface)
Obtaining dependency information for requests from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl.metadata
Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting matplotlib (from insightface)
Obtaining dependency information for matplotlib from https://files.pythonhosted.org/packages/5c/98/211647fc6aa89355c11b028f37ceae95d7e1bbb99ac363cbf4c4297ef4d7/matplotlib-3.8.2-cp39-cp39-macosx_11_0_arm64.whl.metadata
Using cached matplotlib-3.8.2-cp39-cp39-macosx_11_0_arm64.whl.metadata (5.8 kB)
Collecting Pillow (from insightface)
Obtaining dependency information for Pillow from https://files.pythonhosted.org/packages/91/67/9bf0b3c0f43d5e1aa6795318feefad2ec5e5a10b51454b047dc608619fbb/Pillow-10.1.0-cp39-cp39-macosx_11_0_arm64.whl.metadata
Using cached Pillow-10.1.0-cp39-cp39-macosx_11_0_arm64.whl.metadata (9.5 kB)
Collecting scipy (from insightface)
Obtaining dependency information for scipy from https://files.pythonhosted.org/packages/d1/3a/0ab839bb67043ab35e5dcf8b611ca9e08e5a8933b0bc7506eedcec664aae/scipy-1.11.4-cp39-cp39-macosx_12_0_arm64.whl.metadata
Using cached scipy-1.11.4-cp39-cp39-macosx_12_0_arm64.whl.metadata (60 kB)
Collecting scikit-learn (from insightface)
Obtaining dependency information for scikit-learn from https://files.pythonhosted.org/packages/20/0f/51e3ccdc87c25e2e33bf7962249ff8c5ab1d6aed0144fb003348ce8bd352/scikit_learn-1.3.2-cp39-cp39-macosx_12_0_arm64.whl.metadata
Downloading scikit_learn-1.3.2-cp39-cp39-macosx_12_0_arm64.whl.metadata (11 kB)
Collecting scikit-image (from insightface)
Obtaining dependency information for scikit-image from https://files.pythonhosted.org/packages/71/23/9421f904701927d46b497489a48aacc5805284bdb93cb1a34f27d2b0ddfc/scikit_image-0.22.0-cp39-cp39-macosx_12_0_arm64.whl.metadata
Downloading scikit_image-0.22.0-cp39-cp39-macosx_12_0_arm64.whl.metadata (13 kB)
Collecting easydict (from insightface)
Using cached easydict-1.11.tar.gz (6.6 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting cython (from insightface)
Obtaining dependency information for cython from https://files.pythonhosted.org/packages/de/08/98f58494beb69392491b688264ed08259ce453d624059dcefc3fe37e5b5d/Cython-3.0.6-py2.py3-none-any.whl.metadata
Using cached Cython-3.0.6-py2.py3-none-any.whl.metadata (3.2 kB)
Collecting albumentations (from insightface)
Obtaining dependency information for albumentations from https://files.pythonhosted.org/packages/9b/f6/c486cedb4f75147232f32ec4c97026714cfef7c7e247a1f0427bc5489f66/albumentations-1.3.1-py3-none-any.whl.metadata
Using cached albumentations-1.3.1-py3-none-any.whl.metadata (34 kB)
Collecting prettytable (from insightface)
Obtaining dependency information for prettytable from https://files.pythonhosted.org/packages/4d/81/316b6a55a0d1f327d04cc7b0ba9d04058cb62de6c3a4d4b0df280cbe3b0b/prettytable-3.9.0-py3-none-any.whl.metadata
Using cached prettytable-3.9.0-py3-none-any.whl.metadata (26 kB)
Collecting PyYAML (from albumentations->insightface)
Obtaining dependency information for PyYAML from https://files.pythonhosted.org/packages/0e/88/21b2f16cb2123c1e9375f2c93486e35fdc86e63f02e274f0e99c589ef153/PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl.metadata
Using cached PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl.metadata (2.1 kB)
Collecting qudida>=0.0.4 (from albumentations->insightface)
Using cached qudida-0.0.4-py3-none-any.whl (3.5 kB)
Collecting opencv-python-headless>=4.1.1 (from albumentations->insightface)
Obtaining dependency information for opencv-python-headless>=4.1.1 from https://files.pythonhosted.org/packages/12/0f/b87324db284c54d1d1a1c1242a128fb18515915d124325784c90f23d8ef5/opencv_python_headless-4.8.1.78-cp37-abi3-macosx_11_0_arm64.whl.metadata
Using cached opencv_python_headless-4.8.1.78-cp37-abi3-macosx_11_0_arm64.whl.metadata (19 kB)
Collecting networkx>=2.8 (from scikit-image->insightface)
Obtaining dependency information for networkx>=2.8 from https://files.pythonhosted.org/packages/d5/f0/8fbc882ca80cf077f1b246c0e3c3465f7f415439bdea6b899f6b19f61f70/networkx-3.2.1-py3-none-any.whl.metadata
Using cached networkx-3.2.1-py3-none-any.whl.metadata (5.2 kB)
Collecting imageio>=2.27 (from scikit-image->insightface)
Obtaining dependency information for imageio>=2.27 from https://files.pythonhosted.org/packages/c0/69/3aaa69cb0748e33e644fda114c9abd3186ce369edd4fca11107e9f39c6a7/imageio-2.33.1-py3-none-any.whl.metadata
Using cached imageio-2.33.1-py3-none-any.whl.metadata (4.9 kB)
Collecting tifffile>=2022.8.12 (from scikit-image->insightface)
Obtaining dependency information for tifffile>=2022.8.12 from https://files.pythonhosted.org/packages/54/a4/569fc717831969cf48bced350bdaf070cdeab06918d179429899e144358d/tifffile-2023.12.9-py3-none-any.whl.metadata
Using cached tifffile-2023.12.9-py3-none-any.whl.metadata (31 kB)
Requirement already satisfied: packaging>=21 in ./venv/lib/python3.9/site-packages (from scikit-image->insightface) (23.2)
Collecting lazy_loader>=0.3 (from scikit-image->insightface)
Obtaining dependency information for lazy_loader>=0.3 from https://files.pythonhosted.org/packages/a1/c3/65b3814e155836acacf720e5be3b5757130346670ac454fee29d3eda1381/lazy_loader-0.3-py3-none-any.whl.metadata
Using cached lazy_loader-0.3-py3-none-any.whl.metadata (4.3 kB)
Collecting contourpy>=1.0.1 (from matplotlib->insightface)
Obtaining dependency information for contourpy>=1.0.1 from https://files.pythonhosted.org/packages/8a/b8/258adec810e0c4c28292ad1af5736809d393587bd88e79635343fcdc78d0/contourpy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl.metadata
Using cached contourpy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl.metadata (5.8 kB)
Collecting cycler>=0.10 (from matplotlib->insightface)
Obtaining dependency information for cycler>=0.10 from https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl.metadata
Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib->insightface)
Obtaining dependency information for fonttools>=4.22.0 from https://files.pythonhosted.org/packages/2b/ff/8c9b05fd2bbdfe6fee7c0e8a3e8981b4454404dca3ef58fc98a6673a6cf8/fonttools-4.46.0-cp39-cp39-macosx_10_9_universal2.whl.metadata
Downloading fonttools-4.46.0-cp39-cp39-macosx_10_9_universal2.whl.metadata (156 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 156.2/156.2 kB 2.6 MB/s eta 0:00:00
Collecting kiwisolver>=1.3.1 (from matplotlib->insightface)
Obtaining dependency information for kiwisolver>=1.3.1 from https://files.pythonhosted.org/packages/89/a8/3b7e14121bea4438b87630557645bb7648b17b54acaa39b93f4bf7f8d33e/kiwisolver-1.4.5-cp39-cp39-macosx_11_0_arm64.whl.metadata
Using cached kiwisolver-1.4.5-cp39-cp39-macosx_11_0_arm64.whl.metadata (6.4 kB)
Collecting pyparsing>=2.3.1 (from matplotlib->insightface)
Obtaining dependency information for pyparsing>=2.3.1 from https://files.pythonhosted.org/packages/39/92/8486ede85fcc088f1b3dba4ce92dd29d126fd96b0008ea213167940a2475/pyparsing-3.1.1-py3-none-any.whl.metadata
Using cached pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)
Collecting python-dateutil>=2.7 (from matplotlib->insightface)
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting importlib-resources>=3.2.0 (from matplotlib->insightface)
Obtaining dependency information for importlib-resources>=3.2.0 from https://files.pythonhosted.org/packages/93/e8/facde510585869b5ec694e8e0363ffe4eba067cb357a8398a55f6a1f8023/importlib_resources-6.1.1-py3-none-any.whl.metadata
Using cached importlib_resources-6.1.1-py3-none-any.whl.metadata (4.1 kB)
Requirement already satisfied: protobuf>=3.20.2 in ./venv/lib/python3.9/site-packages (from onnx->insightface) (4.25.1)
Collecting wcwidth (from prettytable->insightface)
Obtaining dependency information for wcwidth from https://files.pythonhosted.org/packages/31/b1/a59de0ad3aabb17523a39804f4c6df3ae87ead053a4e25362ae03d73d03a/wcwidth-0.2.12-py2.py3-none-any.whl.metadata
Using cached wcwidth-0.2.12-py2.py3-none-any.whl.metadata (14 kB)
Collecting charset-normalizer<4,>=2 (from requests->insightface)
Obtaining dependency information for charset-normalizer<4,>=2 from https://files.pythonhosted.org/packages/2a/9d/a6d15bd1e3e2914af5955c8eb15f4071997e7078419328fee93dfd497eb7/charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl.metadata
Using cached charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests->insightface)
Obtaining dependency information for idna<4,>=2.5 from https://files.pythonhosted.org/packages/c2/e7/a82b05cf63a603df6e68d59ae6a68bf5064484a0718ea5033660af4b54a9/idna-3.6-py3-none-any.whl.metadata
Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests->insightface)
Obtaining dependency information for urllib3<3,>=1.21.1 from https://files.pythonhosted.org/packages/96/94/c31f58c7a7f470d5665935262ebd7455c7e4c7782eb525658d3dbf4b9403/urllib3-2.1.0-py3-none-any.whl.metadata
Using cached urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests->insightface)
Obtaining dependency information for certifi>=2017.4.17 from https://files.pythonhosted.org/packages/64/62/428ef076be88fa93716b576e4a01f919d25968913e817077a386fcbe4f42/certifi-2023.11.17-py3-none-any.whl.metadata
Using cached certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
Collecting joblib>=1.1.1 (from scikit-learn->insightface)
Obtaining dependency information for joblib>=1.1.1 from https://files.pythonhosted.org/packages/10/40/d551139c85db202f1f384ba8bcf96aca2f329440a844f924c8a0040b6d02/joblib-1.3.2-py3-none-any.whl.metadata
Using cached joblib-1.3.2-py3-none-any.whl.metadata (5.4 kB)
Collecting threadpoolctl>=2.0.0 (from scikit-learn->insightface)
Obtaining dependency information for threadpoolctl>=2.0.0 from https://files.pythonhosted.org/packages/81/12/fd4dea011af9d69e1cad05c75f3f7202cdcbeac9b712eea58ca779a72865/threadpoolctl-3.2.0-py3-none-any.whl.metadata
Using cached threadpoolctl-3.2.0-py3-none-any.whl.metadata (10.0 kB)
Collecting zipp>=3.1.0 (from importlib-resources>=3.2.0->matplotlib->insightface)
Obtaining dependency information for zipp>=3.1.0 from https://files.pythonhosted.org/packages/d9/66/48866fc6b158c81cc2bfecc04c480f105c6040e8b077bc54c634b4a67926/zipp-3.17.0-py3-none-any.whl.metadata
Using cached zipp-3.17.0-py3-none-any.whl.metadata (3.7 kB)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib->insightface)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting typing-extensions (from qudida>=0.0.4->albumentations->insightface)
Obtaining dependency information for typing-extensions from https://files.pythonhosted.org/packages/b7/f4/6a90020cd2d93349b442bfcb657d0dc91eee65491600b2cb1d388bc98e6b/typing_extensions-4.9.0-py3-none-any.whl.metadata
Using cached typing_extensions-4.9.0-py3-none-any.whl.metadata (3.0 kB)
Using cached albumentations-1.3.1-py3-none-any.whl (125 kB)
Downloading scikit_image-0.22.0-cp39-cp39-macosx_12_0_arm64.whl (13.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.3/13.3 MB 9.6 MB/s eta 0:00:00
Using cached Pillow-10.1.0-cp39-cp39-macosx_11_0_arm64.whl (3.3 MB)
Using cached scipy-1.11.4-cp39-cp39-macosx_12_0_arm64.whl (29.7 MB)
Using cached Cython-3.0.6-py2.py3-none-any.whl (1.2 MB)
Using cached matplotlib-3.8.2-cp39-cp39-macosx_11_0_arm64.whl (7.5 MB)
Downloading onnx-1.15.0-cp39-cp39-macosx_10_12_universal2.whl (16.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.3/16.3 MB 6.4 MB/s eta 0:00:00
Using cached prettytable-3.9.0-py3-none-any.whl (27 kB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Downloading scikit_learn-1.3.2-cp39-cp39-macosx_12_0_arm64.whl (9.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 13.8 MB/s eta 0:00:00
Using cached tqdm-4.66.1-py3-none-any.whl (78 kB)
Using cached certifi-2023.11.17-py3-none-any.whl (162 kB)
Using cached charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl (120 kB)
Using cached contourpy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl (242 kB)
Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.46.0-cp39-cp39-macosx_10_9_universal2.whl (2.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 28.4 MB/s eta 0:00:00
Using cached idna-3.6-py3-none-any.whl (61 kB)
Using cached imageio-2.33.1-py3-none-any.whl (313 kB)
Using cached importlib_resources-6.1.1-py3-none-any.whl (33 kB)
Using cached joblib-1.3.2-py3-none-any.whl (302 kB)
Using cached kiwisolver-1.4.5-cp39-cp39-macosx_11_0_arm64.whl (66 kB)
Using cached lazy_loader-0.3-py3-none-any.whl (9.1 kB)
Using cached networkx-3.2.1-py3-none-any.whl (1.6 MB)
Using cached opencv_python_headless-4.8.1.78-cp37-abi3-macosx_11_0_arm64.whl (33.1 MB)
Using cached pyparsing-3.1.1-py3-none-any.whl (103 kB)
Using cached threadpoolctl-3.2.0-py3-none-any.whl (15 kB)
Using cached tifffile-2023.12.9-py3-none-any.whl (223 kB)
Using cached urllib3-2.1.0-py3-none-any.whl (104 kB)
Using cached PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl (174 kB)
Using cached wcwidth-0.2.12-py2.py3-none-any.whl (34 kB)
Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)
Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Building wheels for collected packages: insightface, easydict
Building wheel for insightface (pyproject.toml): started
Building wheel for insightface (pyproject.toml): finished with status 'error'
Building wheel for easydict (setup.py): started
Building wheel for easydict (setup.py): finished with status 'done'
Created wheel for easydict: filename=easydict-1.11-py3-none-any.whl size=6660 sha256=f5a1b8b493bc7cca2853bf84736710140934bacd2f2a89b6a8462c6afd283a42
Stored in directory: /Users/hoatruong/Library/Caches/pip/wheels/91/95/d0/5da6ce153d6b3ef96128cbab9146d4ca7db9fcfef854019251
Successfully built easydict
Failed to build insightface

error: subprocess-exited-with-error

× Building wheel for insightface (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [226 lines of output]
WARNING: pandoc not enabled
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-39
creating build/lib.macosx-10.9-universal2-cpython-39/insightface
copying insightface/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/app
copying insightface/app/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/app
copying insightface/app/mask_renderer.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/app
copying insightface/app/common.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/app
copying insightface/app/face_analysis.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/app
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
copying insightface/utils/download.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
copying insightface/utils/filesystem.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
copying insightface/utils/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
copying insightface/utils/transform.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
copying insightface/utils/storage.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
copying insightface/utils/face_align.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
copying insightface/utils/constant.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/utils
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/landmark.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/inswapper.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/arcface_onnx.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/retinaface.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/attribute.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/model_zoo.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/scrfd.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
copying insightface/model_zoo/model_store.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/model_zoo
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/commands
copying insightface/commands/insightface_cli.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/commands
copying insightface/commands/rec_add_mask_param.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/commands
copying insightface/commands/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/commands
copying insightface/commands/model_download.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/commands
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/data
copying insightface/data/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data
copying insightface/data/rec_builder.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data
copying insightface/data/pickle_object.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data
copying insightface/data/image.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty
copying insightface/thirdparty/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d
copying insightface/thirdparty/face3d/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
copying insightface/thirdparty/face3d/mesh/light.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
copying insightface/thirdparty/face3d/mesh/render.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
copying insightface/thirdparty/face3d/mesh/io.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
copying insightface/thirdparty/face3d/mesh/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
copying insightface/thirdparty/face3d/mesh/vis.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
copying insightface/thirdparty/face3d/mesh/transform.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh_numpy
copying insightface/thirdparty/face3d/mesh_numpy/light.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh_numpy
copying insightface/thirdparty/face3d/mesh_numpy/render.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh_numpy
copying insightface/thirdparty/face3d/mesh_numpy/io.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh_numpy
copying insightface/thirdparty/face3d/mesh_numpy/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh_numpy
copying insightface/thirdparty/face3d/mesh_numpy/vis.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh_numpy
copying insightface/thirdparty/face3d/mesh_numpy/transform.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh_numpy
creating build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/morphable_model
copying insightface/thirdparty/face3d/morphable_model/morphabel_model.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/morphable_model
copying insightface/thirdparty/face3d/morphable_model/fit.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/morphable_model
copying insightface/thirdparty/face3d/morphable_model/init.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/morphable_model
copying insightface/thirdparty/face3d/morphable_model/load.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/morphable_model
running egg_info
writing insightface.egg-info/PKG-INFO
writing dependency_links to insightface.egg-info/dependency_links.txt
writing entry points to insightface.egg-info/entry_points.txt
writing requirements to insightface.egg-info/requires.txt
writing top-level names to insightface.egg-info/top_level.txt
reading manifest file 'insightface.egg-info/SOURCES.txt'
writing manifest file 'insightface.egg-info/SOURCES.txt'
/private/var/folders/xk/tdz2k3tn02nfp3fyw2g32db40000gn/T/pip-build-env-o4dhg7bp/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'insightface.data.images' is absent from the packages configuration.
!!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'insightface.data.images' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.
  
          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'insightface.data.images' is explicitly added
          to the `packages` configuration field.
  
          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
  
          You can read more about "package discovery" on setuptools documentation page:
  
          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
  
          If you don't want 'insightface.data.images' to be distributed and are
          already explicitly excluding 'insightface.data.images' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.
  
          You can read more about "package data files" on setuptools documentation page:
  
          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
  
  
          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************
  
  !!
    check.warn(importable)
  /private/var/folders/xk/tdz2k3tn02nfp3fyw2g32db40000gn/T/pip-build-env-o4dhg7bp/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'insightface.data.objects' is absent from the `packages` configuration.
  !!
  
          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'insightface.data.objects' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.
  
          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'insightface.data.objects' is explicitly added
          to the `packages` configuration field.
  
          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
  
          You can read more about "package discovery" on setuptools documentation page:
  
          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
  
          If you don't want 'insightface.data.objects' to be distributed and are
          already explicitly excluding 'insightface.data.objects' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.
  
          You can read more about "package data files" on setuptools documentation page:
  
          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
  
  
          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************
  
  !!
    check.warn(importable)
  /private/var/folders/xk/tdz2k3tn02nfp3fyw2g32db40000gn/T/pip-build-env-o4dhg7bp/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'insightface.thirdparty.face3d.mesh.cython' is absent from the `packages` configuration.
  !!
  
          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'insightface.thirdparty.face3d.mesh.cython' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.
  
          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'insightface.thirdparty.face3d.mesh.cython' is explicitly added
          to the `packages` configuration field.
  
          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
  
          You can read more about "package discovery" on setuptools documentation page:
  
          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
  
          If you don't want 'insightface.thirdparty.face3d.mesh.cython' to be distributed and are
          already explicitly excluding 'insightface.thirdparty.face3d.mesh.cython' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.
  
          You can read more about "package data files" on setuptools documentation page:
  
          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
  
  
          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************
  
  !!
    check.warn(importable)
  creating build/lib.macosx-10.9-universal2-cpython-39/insightface/data/images
  copying insightface/data/images/Tom_Hanks_54745.png -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data/images
  copying insightface/data/images/mask_black.jpg -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data/images
  copying insightface/data/images/mask_blue.jpg -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data/images
  copying insightface/data/images/mask_green.jpg -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data/images
  copying insightface/data/images/mask_white.jpg -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data/images
  copying insightface/data/images/t1.jpg -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data/images
  creating build/lib.macosx-10.9-universal2-cpython-39/insightface/data/objects
  copying insightface/data/objects/meanshape_68.pkl -> build/lib.macosx-10.9-universal2-cpython-39/insightface/data/objects
  creating build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  copying insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  copying insightface/thirdparty/face3d/mesh/cython/mesh_core.h -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  copying insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.c -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  copying insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpp -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  copying insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.pyx -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  copying insightface/thirdparty/face3d/mesh/cython/setup.py -> build/lib.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  running build_ext
  building 'insightface.thirdparty.face3d.mesh.cython.mesh_core_cython' extension
  creating build/temp.macosx-10.9-universal2-cpython-39
  creating build/temp.macosx-10.9-universal2-cpython-39/insightface
  creating build/temp.macosx-10.9-universal2-cpython-39/insightface/thirdparty
  creating build/temp.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d
  creating build/temp.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh
  creating build/temp.macosx-10.9-universal2-cpython-39/insightface/thirdparty/face3d/mesh/cython
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Iinsightface/thirdparty/face3d/mesh/cython -I/private/var/folders/xk/tdz2k3tn02nfp3fyw2g32db40000gn/T/pip-build-env-o4dhg7bp/overlay/lib/python3.9/site-packages/numpy/core/include -I/Users/hoatruong/PycharmProjects/pythonProject2/venv/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp -o build/temp.macosx-10.9-universal2-cpython-39/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:4:10: fatal error: cannot open file '/usr/local/include/stdio.h': Permission denied
  #include <stdio.h>
           ^
  1 error generated.
  error: command '/usr/bin/gcc' 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
ERROR: Could not build wheels for insightface, which is required to install pyproject.toml-based projects

@vermi
Copy link

vermi commented Feb 2, 2024

Same exact issue. Seems to be that insightface doesn't support running on M1.

@horaceho
Copy link

Try switch the compiler to llvm:

brew install llvm libomp
find /opt/homebrew/ -name clang
export CC=/opt/homebrew//Cellar/llvm/17.0.6_1/bin/clang

and then

pip install insightface==0.7.3

@vermi
Copy link

vermi commented Feb 16, 2024

Thank you @horaceho -- can confirm that this did indeed solve my issue.

@yvzyildirim
Copy link

Try switch the compiler to llvm:

brew install llvm libomp
find /opt/homebrew/ -name clang
export CC=/opt/homebrew//Cellar/llvm/17.0.6_1/bin/clang

and then

pip install insightface==0.7.3

did not work

@rokpopovic
Copy link

Have you find the solution yet? I am also having the same issue, and there is no tutorials on how to install on Mac

@studentofcoding
Copy link

For Mac kindly check my post here #2538 (comment)

cc: @yvzyildirim @rokpopovic

@axsaucedo
Copy link

@horaceho thanks! That did it for me as well

@johan44co
Copy link

Is the compiler, try this:)

#!/bin/bash

# Install GCC using Homebrew
brew install gcc

# Locate installed GCC version
GCC_VERSION=$(ls /opt/homebrew/bin/gcc-* | grep -o 'gcc-[0-9]*' | head -n 1 | cut -d'-' -f2)
GXX_VERSION=$(ls /opt/homebrew/bin/g++-* | grep -o 'g++-[0-9]*' | head -n 1 | cut -d'-' -f2)

# Set environment variables to use GCC
export CC=/opt/homebrew/bin/gcc-$GCC_VERSION
export CXX=/opt/homebrew/bin/g++-$GXX_VERSION

# Verify the compiler settings
echo "Using C compiler: $CC"
echo "Using C++ compiler: $CXX"

# Install the specific version of insightface
pip install insightface==0.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants