face_recognition icon indicating copy to clipboard operation
face_recognition copied to clipboard

Cannot install on Windows 11 from setup.py

Open Oddy123123 opened this issue 3 years ago • 10 comments

  • face_recognition version: 1.4.0
  • Python version: 3.8.8
  • Operating System: Windows 11

Description

I'm trying to install face_recognition using setup.py file, but I'm getting an error during installation.

What I Did

  • I have Visual Studio 2019 with C++ installed.
  • I installed cmake using pip install cmake and it was successfully installed (version 3.22.1)
  • Finally I downloaded this project as a zip file, extracted it, went to its directory, and ran this command: python setup.py install
  • I'm getting the following error many times:
C:\Users\abdul\anaconda3\Library\include\gif_lib.h(286,61): error C2734: 'GifAsciiTable8x8': 'const' object must be ini
tialized if not 'extern' (compiling source file C:\Users\abdul\AppData\Local\Temp\easy_install-0keuxls6\dlib-19.22.1\to
ols\python\src\sequence_segmenter.cpp) [C:\Users\abdul\AppData\Local\Temp\easy_install-0keuxls6\dlib-19.22.1\build\temp
.win-amd64-3.8\Release\_dlib_pybind11.vcxproj]

Oddy123123 avatar Dec 30 '21 13:12 Oddy123123

İf the dlip library is not installed, install VMware Workstation (or other Virtualization) and install Ubuntu than try again install "Face Recognition".

Follow this order to load it.

  • pip install cmake
  • pip install dlib
  • pip install opencv-python
  • pip install face_recognition

or look:

Windows Installation Tutorial #175

If not work send the error message !!

real-shut-down-exe avatar Jan 04 '22 08:01 real-shut-down-exe

Follow this order

  • Python version: 3.9 64-bit
  • Operating System: Windows 11
  • Pip Support version: cp39-cp39-win_amd64

and then download this whl file dlib-19.23.0-cp39-cp39-win_amd64.whl dlib-19.23.0-cp39-cp39-win_amd64.whl (github)

open the powershell in the file path pip install dlib-19.23.0-cp39-cp39-win_amd64.whl

Billyas avatar Feb 26 '22 06:02 Billyas

hi, i tried following that, but i got this error:

ERROR: dlib-19.23.0-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

what might i do to fix said error?

mplatypus avatar May 06 '22 06:05 mplatypus

i think you need this version

  • Python version: 3.9 64-bit

Billyas avatar May 06 '22 08:05 Billyas

is there a version for 3.10? or not yet?

mplatypus avatar May 07 '22 04:05 mplatypus

Follow this order

  • Python version: 3.9 64-bit
  • Operating System: Windows 11
  • Pip Support version: cp39-cp39-win_amd64

and then download this whl file dlib-19.23.0-cp39-cp39-win_amd64.whl dlib-19.23.0-cp39-cp39-win_amd64.whl (github)

open the powershell in the file path pip install dlib-19.23.0-cp39-cp39-win_amd64.whl

This work for me, thanks a lot

Warriorgiroro avatar May 24 '22 07:05 Warriorgiroro

I got the same error, I recommend to use dlib 19.18 for sure this source, and pillow 9.2

LOANPIA avatar Aug 01 '22 10:08 LOANPIA

My python version is 3.10.6 OS is windows 11 This is the error I'm getting:

ERROR: dlib-19.23.0-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

Can someone please tell me how to solve this issue?

S-Vaishnavi avatar Oct 19 '22 04:10 S-Vaishnavi

My python version is 3.10.6 OS is windows 11 This is the error I'm getting:

ERROR: dlib-19.23.0-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

Can someone please tell me how to solve this issue?

this whl package just for [Python version: 3.9 64-bit]

run pip debug --verbose

image

Only matching versions will install whl correctly

Billyas avatar Oct 19 '22 05:10 Billyas

My python version is 3.10.6 OS is windows 11 This is the error I'm getting: ERROR: dlib-19.23.0-cp39-cp39-win_amd64.whl is not a supported wheel on this platform. Can someone please tell me how to solve this issue?

this whl package just for [Python version: 3.9 64-bit]

run pip debug --verbose

image

Only matching versions will install whl correctly

My matching version is cp310-cp310-win_amd64

which command shall I give to install it?

I'm getting this error:

ERROR: Could not find a version that satisfies the requirement dlib-19.23.0-cp310-cp310-win_amd64 (from versions: none) ERROR: No matching distribution found for dlib-19.23.0-cp310-cp310-win_amd64

when I tried to use dlib-19.23.0-cp310-cp310-win_amd64

S-Vaishnavi avatar Oct 19 '22 06:10 S-Vaishnavi

Please follow the below steps

  1. Download and install latest windows version of Cmake software from 'https://cmake.org/download/'. Ensure the option should be selected to enable it for all users during installation. Once installed, verify the Path variable in Environment variables is updated for Cmake

  2. Download and install Microsoft Visual C++ Redistributable latest supported downloads from 'https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170'

During installation, need to select Cmake compiler (C++ Cmake tools for Windows should be selected)

  1. Add an environment variable 'DISTUTILS_USE_SDK' with value 1 (Refer to https://wiki.python.org/moin/WindowsCompilers)

  2. Download and install the version of Python (python 3.10.5) and ensure it should be present within 'C:\Program Files' Directory

  3. Install/upgrade the below required python packages in command prompt as an administrator

    • pip
    • ez_setup
    • setuptools
    • wheel
    • dlib
    • face-recognition
    • face-recognition-models
  4. Open the source code in Visual Studio code as an Administrator and open Requirements.txt file. Install each package one by one from it by running the 'pip install packagename' command in terminal.

  5. Once installed, update the version number of packages in requirements.txt file by running 'pip list' command to see all packages installed along with their version number

  6. In Settings.py comment the database setting for mysql and use default setting for SQLite. Once done, run 'python manage.py migrate' command in terminal

singhaje avatar Feb 04 '23 14:02 singhaje

worked perfect for me

koshkaDM avatar Feb 12 '23 23:02 koshkaDM