In Windows, LNK2001 errors and an exit code of 2011 that cause the wheel build to fail are not uncommon. Unfortunately, the solution is not easy to find without a deeper understanding of Python and its build behavior in Windows.
Insightface uses setuptools, Cython, and the Microsoft Visual C++ compiler to perform it's build. How you set up the build environment varies depending on which version of Python you are using. Refer to the Python WindowsCompilers wiki topic for instructions appropriate to your particular Python version.
After that, make sure that you use pip to update or install setuptools and Cython.
In my case I have:
Python 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC
v.1937 64 bit (AMD64)]
Neither the standard Windows Command Prompt nor the Developer Command Prompt for VS2022 were sufficient to get a successful build even after following the instructions in the wiki article. It wasn't until I used the x64 Native Tools Command Prompt for VS 2022 that I was able to get a successful build and install of insightface in Windows.
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/).