deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
21.92k stars 5.26k forks source link

The installation of insightface encountered a sub-process error, and the metadata for each version of pluggy from each source was corrupted, so it could not be installed correctly #2576

Open petercham opened 1 month ago

petercham commented 1 month ago

img_v3_02ao_8b5ee810-097f-4e2f-9397-e3ea136c6c4g 更换清华源也一样全都是metadata has 0.0.0

petercham commented 1 month ago

My system environment is WIndows11, the installation to the system environment is very smooth and can be installed, but when installing to ComfyUI's virtual environment python_embedded, it will report an error:

  creating build\temp.win-amd64-cpython-311\Release\insightface\thirdparty\face3d\mesh\cython
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinsightface/thirdparty/face3d/mesh/cython -IC:\Work\Stable-Diffusion\python_embeded\Lib\site-packages\numpy\core\include -IC:\Work\Stable-Diffusion\python_embeded\include -IC:\Work\Stable-Diffusion\python_embeded\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpinsightface/thirdparty/face3d/mesh/cython/mesh_core.cpp /Fobuild\temp.win-amd64-cpython-311\Release\insightface/thirdparty/face3d/mesh/cython/mesh_core.obj
  mesh_core.cpp
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(147): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(147): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(210): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(210): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(294): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(294): warning C4244: “=”: 从“int”转换到“float”,可能丢失数据
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinsightface/thirdparty/face3d/mesh/cython -IC:\Work\Stable-Diffusion\python_embeded\Lib\site-packages\numpy\core\include -IC:\Work\Stable-Diffusion\python_embeded\include -IC:\Work\Stable-Diffusion\python_embeded\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpinsightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpp /Fobuild\temp.win-amd64-cpython-311\Release\insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.obj
  mesh_core_cython.cpp
  insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpp(36): fatal error C1083: 无法打开包括文件: “Python.h”: No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [end of output]
petercham commented 1 month ago

Because it prompted that the pytho.h header file could not be opened, the following command was used again to install it:

env>python.exe -m pip install --global-option=build_ext --global-option="-IC:\Users\peter\AppData\Local\Programs\Python\Python310\include" insightface==0.7.3 -i https://pypi.tuna.tsinghua.edu.cn/simple

Then came the situation described in the title。