s0md3v / sd-webui-roop

roop extension for StableDiffusion web-ui
GNU Affero General Public License v3.0
3.36k stars 857 forks source link

install insightface==0.7.3 Build Failure with Python 3.10.6 and Visual Studio #126

Closed TrueHolon closed 1 year ago

TrueHolon commented 1 year ago

Subject: Bug Report: Build Failure with Python 3.10.6 and Visual Studio

Dear GitHub Support Team,

I hope this message finds you well. I am writing to report a bug related to the build process for a Python package, specifically when using Python 3.10.6 along with Visual Studio, including the Python and C++ packages. I have encountered an error while attempting to build the package, and I would appreciate your assistance in resolving this issue.

System Information:

Operating System: Win 10 GPU: RTX 3060 12gb Python Version: 3.10.6 Visual Studio Version: Visual Studio Professional 2022 17.6.4

Description of the Issue: When attempting to build the package mentioned above using Python 3.10.6 and Visual Studio, I encountered a build failure. The build process started normally, but it failed to complete successfully, resulting in an error.

Error Message: Unfortunately, the error message I received does not provide specific details or a traceback. The console output suggests that the build process failed with an exit code of 1. However, I did not receive any further information regarding the cause of the failure.

C:\Users\Holon>pip install insightface==0.7.3

WARNING: Ignoring invalid distribution -ip (c:\users\holon\appdata\local\programs\python\python310\lib\site-packages) Collecting insightface==0.7.3 Using cached insightface-0.7.3.tar.gz (439 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (1.25.0) Requirement already satisfied: onnx in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (1.14.0) Requirement already satisfied: tqdm in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (4.65.0) Requirement already satisfied: requests in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (2.31.0) Requirement already satisfied: matplotlib in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (3.7.1) Requirement already satisfied: Pillow in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (9.5.0) Requirement already satisfied: scipy in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (1.11.1) Requirement already satisfied: scikit-learn in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (1.3.0) Requirement already satisfied: scikit-image in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (0.21.0) Requirement already satisfied: easydict in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (1.10) Requirement already satisfied: cython in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (3.0.0b1) Requirement already satisfied: albumentations in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (1.3.1) Requirement already satisfied: prettytable in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from insightface==0.7.3) (3.8.0) Requirement already satisfied: PyYAML in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from albumentations->insightface==0.7.3) (6.0) Requirement already satisfied: qudida>=0.0.4 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from albumentations->insightface==0.7.3) (0.0.4) Requirement already satisfied: opencv-python-headless>=4.1.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from albumentations->insightface==0.7.3) (4.7.0.72) Requirement already satisfied: networkx>=2.8 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-image->insightface==0.7.3) (3.0) Requirement already satisfied: imageio>=2.27 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-image->insightface==0.7.3) (2.31.1) Requirement already satisfied: tifffile>=2022.8.12 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-image->insightface==0.7.3) (2023.4.12) Requirement already satisfied: PyWavelets>=1.1.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-image->insightface==0.7.3) (1.4.1) Requirement already satisfied: packaging>=21 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-image->insightface==0.7.3) (23.0) Requirement already satisfied: lazy_loader>=0.2 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-image->insightface==0.7.3) (0.2) Requirement already satisfied: contourpy>=1.0.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->insightface==0.7.3) (1.0.7) Requirement already satisfied: cycler>=0.10 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->insightface==0.7.3) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->insightface==0.7.3) (4.39.0) Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->insightface==0.7.3) (1.4.4) Requirement already satisfied: pyparsing>=2.3.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->insightface==0.7.3) (3.0.7) Requirement already satisfied: python-dateutil>=2.7 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->insightface==0.7.3) (2.8.2) Requirement already satisfied: protobuf>=3.20.2 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from onnx->insightface==0.7.3) (4.23.3) Requirement already satisfied: typing-extensions>=3.6.2.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from onnx->insightface==0.7.3) (4.6.3) Requirement already satisfied: wcwidth in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from prettytable->insightface==0.7.3) (0.2.6) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from requests->insightface==0.7.3) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from requests->insightface==0.7.3) (3.4) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from requests->insightface==0.7.3) (1.26.15) Requirement already satisfied: certifi>=2017.4.17 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from requests->insightface==0.7.3) (2022.12.7) Requirement already satisfied: joblib>=1.1.1 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-learn->insightface==0.7.3) (1.2.0) Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from scikit-learn->insightface==0.7.3) (3.0.0) Requirement already satisfied: colorama in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from tqdm->insightface==0.7.3) (0.4.6) Requirement already satisfied: six>=1.5 in c:\users\holon\appdata\local\programs\python\python310\lib\site-packages (from python-dateutil>=2.7->matplotlib->insightface==0.7.3) (1.15.0) Building wheels for collected packages: insightface Building wheel for insightface (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for insightface (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [224 lines of output] WARNING: pandoc not enabled running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\insightface copying insightface__init.py -> build\lib.win-amd64-cpython-310\insightface creating build\lib.win-amd64-cpython-310\insightface\app copying insightface\app\common.py -> build\lib.win-amd64-cpython-310\insightface\app copying insightface\app\face_analysis.py -> build\lib.win-amd64-cpython-310\insightface\app copying insightface\app\mask_renderer.py -> build\lib.win-amd64-cpython-310\insightface\app copying insightface\app__init.py -> build\lib.win-amd64-cpython-310\insightface\app creating build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands\insightface_cli.py -> build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands\model_download.py -> build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands\rec_add_mask_param.py -> build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands__init.py -> build\lib.win-amd64-cpython-310\insightface\commands creating build\lib.win-amd64-cpython-310\insightface\data copying insightface\data\image.py -> build\lib.win-amd64-cpython-310\insightface\data copying insightface\data\pickle_object.py -> build\lib.win-amd64-cpython-310\insightface\data copying insightface\data\rec_builder.py -> build\lib.win-amd64-cpython-310\insightface\data copying insightface\data__init__.py -> build\lib.win-amd64-cpython-310\insightface\data creating build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\arcface_onnx.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\attribute.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\inswapper.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\landmark.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\model_store.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\model_zoo.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\retinaface.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\scrfd.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\init__.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo creating build\lib.win-amd64-cpython-310\insightface\thirdparty copying insightface\thirdparty\init__.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty creating build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\constant.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\download.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\face_align.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\filesystem.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\storage.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\transform.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\init.py -> build\lib.win-amd64-cpython-310\insightface\utils creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d copying insightface\thirdparty\face3d\init.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\io.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\light.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\render.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\transform.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\vis.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\init.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\io.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\light.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\render.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\transform.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\vis.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\init.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\fit.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\load.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\morphabel_model.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\init__.py -> build\lib.win-amd64-cpython-310\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' C:\Users\Holon\AppData\Local\Temp\pip-build-env-y4fuxobp\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _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)
  C:\Users\Holon\AppData\Local\Temp\pip-build-env-y4fuxobp\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _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)
  C:\Users\Holon\AppData\Local\Temp\pip-build-env-y4fuxobp\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _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)
  creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core.cpp -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.cpp -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  creating build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\Tom_Hanks_54745.png -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_black.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_blue.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_green.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_white.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\t1.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  creating build\lib.win-amd64-cpython-310\insightface\data\objects
  copying insightface\data\objects\meanshape_68.pkl -> build\lib.win-amd64-cpython-310\insightface\data\objects
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core.h -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.c -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.pyx -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\setup.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  running build_ext
  building 'insightface.thirdparty.face3d.mesh.cython.mesh_core_cython' extension
  creating build\temp.win-amd64-cpython-310
  creating build\temp.win-amd64-cpython-310\Release
  creating build\temp.win-amd64-cpython-310\Release\insightface
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty\face3d
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty\face3d\mesh
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty\face3d\mesh\cython
  "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinsightface/thirdparty/face3d/mesh/cython -IC:\Users\Holon\AppData\Local\Temp\pip-build-env-y4fuxobp\overlay\Lib\site-packages\numpy\core\include -IC:\Users\Holon\AppData\Local\Programs\Python\Python310\include -IC:\Users\Holon\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" /EHsc /Tpinsightface/thirdparty/face3d/mesh/cython/mesh_core.cpp /Fobuild\temp.win-amd64-cpython-310\Release\insightface/thirdparty/face3d/mesh/cython/mesh_core.obj
  mesh_core.cpp
  C:\Users\Holon\AppData\Local\Temp\pip-install-x9479xr1\insightface_bf778907e8b749d4b8f156638f5f4640\insightface\thirdparty\face3d\mesh\cython\mesh_core.h(4): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for insightface Failed to build insightface ERROR: Could not build wheels for insightface, which is required to install pyproject.toml-based projects

Additional Notes:

I have successfully built and installed other Python packages using the same Python and Visual Studio versions, so it appears to be specific to this package. I have checked the package's documentation and GitHub repository for any known issues or compatibility problems with Python 3.10.6, but I could not find any relevant information.

Gourieff commented 1 year ago

You have to install Insightface inside activated venv, not in Windows directly Go to venv\Scripts folder inside your sd-webui directory and run cmd there Then run activate You'll see smth like (venv) C:\-path-to-your-sdwebui-folder-\stable-diffusion-webui\venv\Scripts> And only after that pip install insightface==0.7.3 When all is done - type deactivate

TrueHolon commented 1 year ago

That didn't help nor solve the issue.

(venv) S:\Stable Diffusion\stable-diffusion-webui\venv\Scripts>pip install insightface==0.7.3 Collecting insightface==0.7.3 Using cached insightface-0.7.3.tar.gz (439 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: scipy in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from insightface==0.7.3) (1.11.1) Requirement already satisfied: tqdm in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from insightface==0.7.3) (4.65.0) Requirement already satisfied: matplotlib in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from insightface==0.7.3) (3.7.1) Collecting easydict Using cached easydict-1.10-py3-none-any.whl Collecting scikit-learn Using cached scikit_learn-1.3.0-cp310-cp310-win_amd64.whl (9.2 MB) Requirement already satisfied: Pillow in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from insightface==0.7.3) (9.5.0) Requirement already satisfied: requests in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from insightface==0.7.3) (2.31.0) Collecting cython Using cached Cython-0.29.36-py2.py3-none-any.whl (988 kB) Collecting albumentations Using cached albumentations-1.3.1-py3-none-any.whl (125 kB) Requirement already satisfied: numpy in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from insightface==0.7.3) (1.23.5) Collecting onnx Using cached onnx-1.14.0-cp310-cp310-win_amd64.whl (13.3 MB) Collecting prettytable Using cached prettytable-3.8.0-py3-none-any.whl (27 kB) Requirement already satisfied: scikit-image in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from insightface==0.7.3) (0.20.0) Requirement already satisfied: PyYAML in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from albumentations->insightface==0.7.3) (6.0) Collecting qudida>=0.0.4 Using cached qudida-0.0.4-py3-none-any.whl (3.5 kB) Requirement already satisfied: opencv-python-headless>=4.1.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from albumentations->insightface==0.7.3) (4.7.0.72) Requirement already satisfied: networkx>=2.8 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from scikit-image->insightface==0.7.3) (3.1) Requirement already satisfied: tifffile>=2019.7.26 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from scikit-image->insightface==0.7.3) (2023.4.12) Requirement already satisfied: imageio>=2.4.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from scikit-image->insightface==0.7.3) (2.31.1) Requirement already satisfied: packaging>=20.0 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from scikit-image->insightface==0.7.3) (23.1) Requirement already satisfied: lazy_loader>=0.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from scikit-image->insightface==0.7.3) (0.2) Requirement already satisfied: PyWavelets>=1.1.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from scikit-image->insightface==0.7.3) (1.4.1) Requirement already satisfied: kiwisolver>=1.0.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->insightface==0.7.3) (1.4.4) Requirement already satisfied: python-dateutil>=2.7 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->insightface==0.7.3) (2.8.2) Requirement already satisfied: fonttools>=4.22.0 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->insightface==0.7.3) (4.40.0) Requirement already satisfied: contourpy>=1.0.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->insightface==0.7.3) (1.1.0) Requirement already satisfied: pyparsing>=2.3.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->insightface==0.7.3) (3.1.0) Requirement already satisfied: cycler>=0.10 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->insightface==0.7.3) (0.11.0) Collecting protobuf>=3.20.2 Using cached protobuf-4.23.3-cp310-abi3-win_amd64.whl (422 kB) Requirement already satisfied: typing-extensions>=3.6.2.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from onnx->insightface==0.7.3) (4.7.0) Requirement already satisfied: wcwidth in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from prettytable->insightface==0.7.3) (0.2.6) Requirement already satisfied: urllib3<3,>=1.21.1 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from requests->insightface==0.7.3) (1.26.16) Requirement already satisfied: certifi>=2017.4.17 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from requests->insightface==0.7.3) (2023.5.7) Requirement already satisfied: idna<4,>=2.5 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from requests->insightface==0.7.3) (3.4) Requirement already satisfied: charset-normalizer<4,>=2 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from requests->insightface==0.7.3) (3.1.0) Collecting threadpoolctl>=2.0.0 Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB) Collecting joblib>=1.1.1 Downloading joblib-1.3.1-py3-none-any.whl (301 kB) ---------------------------------------- 302.0/302.0 kB 3.1 MB/s eta 0:00:00 Requirement already satisfied: colorama in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from tqdm->insightface==0.7.3) (0.4.6) Requirement already satisfied: six>=1.5 in s:\stable diffusion\stable-diffusion-webui\venv\lib\site-packages (from python-dateutil>=2.7->matplotlib->insightface==0.7.3) (1.16.0) Building wheels for collected packages: insightface Building wheel for insightface (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for insightface (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [224 lines of output] WARNING: pandoc not enabled running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\insightface copying insightface__init.py -> build\lib.win-amd64-cpython-310\insightface creating build\lib.win-amd64-cpython-310\insightface\app copying insightface\app\common.py -> build\lib.win-amd64-cpython-310\insightface\app copying insightface\app\face_analysis.py -> build\lib.win-amd64-cpython-310\insightface\app copying insightface\app\mask_renderer.py -> build\lib.win-amd64-cpython-310\insightface\app copying insightface\app__init.py -> build\lib.win-amd64-cpython-310\insightface\app creating build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands\insightface_cli.py -> build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands\model_download.py -> build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands\rec_add_mask_param.py -> build\lib.win-amd64-cpython-310\insightface\commands copying insightface\commands__init.py -> build\lib.win-amd64-cpython-310\insightface\commands creating build\lib.win-amd64-cpython-310\insightface\data copying insightface\data\image.py -> build\lib.win-amd64-cpython-310\insightface\data copying insightface\data\pickle_object.py -> build\lib.win-amd64-cpython-310\insightface\data copying insightface\data\rec_builder.py -> build\lib.win-amd64-cpython-310\insightface\data copying insightface\data__init__.py -> build\lib.win-amd64-cpython-310\insightface\data creating build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\arcface_onnx.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\attribute.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\inswapper.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\landmark.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\model_store.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\model_zoo.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\retinaface.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\scrfd.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo copying insightface\model_zoo\init__.py -> build\lib.win-amd64-cpython-310\insightface\model_zoo creating build\lib.win-amd64-cpython-310\insightface\thirdparty copying insightface\thirdparty\init__.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty creating build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\constant.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\download.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\face_align.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\filesystem.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\storage.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\transform.py -> build\lib.win-amd64-cpython-310\insightface\utils copying insightface\utils\init.py -> build\lib.win-amd64-cpython-310\insightface\utils creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d copying insightface\thirdparty\face3d\init.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\io.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\light.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\render.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\transform.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\vis.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\init.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\io.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\light.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\render.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\transform.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\vis.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\init.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh_numpy creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\fit.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\load.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\morphabel_model.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\init__.py -> build\lib.win-amd64-cpython-310\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' C:\Users\Holon\AppData\Local\Temp\pip-build-env-3sr6vyrg\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _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)
  C:\Users\Holon\AppData\Local\Temp\pip-build-env-3sr6vyrg\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _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)
  C:\Users\Holon\AppData\Local\Temp\pip-build-env-3sr6vyrg\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _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)
  creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core.cpp -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.cpp -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  creating build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\Tom_Hanks_54745.png -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_black.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_blue.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_green.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\mask_white.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  copying insightface\data\images\t1.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
  creating build\lib.win-amd64-cpython-310\insightface\data\objects
  copying insightface\data\objects\meanshape_68.pkl -> build\lib.win-amd64-cpython-310\insightface\data\objects
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core.h -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.c -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.pyx -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\setup.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
  running build_ext
  building 'insightface.thirdparty.face3d.mesh.cython.mesh_core_cython' extension
  creating build\temp.win-amd64-cpython-310
  creating build\temp.win-amd64-cpython-310\Release
  creating build\temp.win-amd64-cpython-310\Release\insightface
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty\face3d
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty\face3d\mesh
  creating build\temp.win-amd64-cpython-310\Release\insightface\thirdparty\face3d\mesh\cython
  "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinsightface/thirdparty/face3d/mesh/cython -IC:\Users\Holon\AppData\Local\Temp\pip-build-env-3sr6vyrg\overlay\Lib\site-packages\numpy\core\include "-IS:\Stable Diffusion\stable-diffusion-webui\venv\include" -IC:\Users\Holon\AppData\Local\Programs\Python\Python310\include -IC:\Users\Holon\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" /EHsc /Tpinsightface/thirdparty/face3d/mesh/cython/mesh_core.cpp /Fobuild\temp.win-amd64-cpython-310\Release\insightface/thirdparty/face3d/mesh/cython/mesh_core.obj
  mesh_core.cpp
  C:\Users\Holon\AppData\Local\Temp\pip-install-a6_wiapp\insightface_1f3306c9069e4c7eb2fc59f9b50ddd3a\insightface\thirdparty\face3d\mesh\cython\mesh_core.h(4): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for insightface Failed to build insightface ERROR: Could not build wheels for insightface, which is required to install pyproject.toml-based projects

[notice] A new release of pip available: 22.2.1 -> 23.1.2 [notice] To update, run: python.exe -m pip install --upgrade pip

Tharki07 commented 1 year ago

image

Adding Windows 11 SDK in visual studio and then running the following pip command in activated python virtual environment helped me. pip install insightface==0.7.3

torcelly commented 1 year ago

I have the same problem here but from a macOS

PuckStar commented 11 months ago

tried all the above. still not working :(

pishiver commented 10 months ago

I'm having the same problem. Freshly installed visual studio. It installs fine in the main windows environment(I uninstalled it before continuing), but not in the venv.

lxiaodao commented 10 months ago

image

Adding Windows 11 SDK in visual studio and then running the following pip command in activated python virtual environment helped me. pip install insightface==0.7.3

Thanks! I also meet the same problem and install Windows 11 SDK.It works.

TechSavage2 commented 5 months ago

For those on linux (and presumably on macOS) this can usually be solved by installing python3-dev.

Debian/Ubuntu:

# apt install python3-dev

Fedora/RHEL:

# dnf install python3-devel

Akila-I commented 4 months ago

Linux users, also make sure you have gcc and g++ installed. For Debian/Ubuntu:

sudo apt install gcc g++
qdDog commented 1 month ago

tried all the above. still not working :(

same here! i have same error! on window 10!