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

Cannot install on Windows 11 from setup.py #1401

Open
Oddy123123 opened this issue Dec 30, 2021 · 12 comments
Open

Cannot install on Windows 11 from setup.py #1401

Oddy123123 opened this issue Dec 30, 2021 · 12 comments

Comments

@Oddy123123
Copy link

  • 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]
@real-shut-down-exe
Copy link

real-shut-down-exe commented Jan 4, 2022

İ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 !!

@Billyas
Copy link

Billyas commented Feb 26, 2022

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

@mplatypus
Copy link

mplatypus commented May 6, 2022

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?

@Billyas
Copy link

Billyas commented May 6, 2022

i think you need this version

  • Python version: 3.9 64-bit

@mplatypus
Copy link

is there a version for 3.10? or not yet?

@Warriorgiroro
Copy link

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

@LOANPIA
Copy link

LOANPIA commented Aug 1, 2022

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

@S-Vaishnavi
Copy link

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?

@Billyas
Copy link

Billyas commented Oct 19, 2022

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

@S-Vaishnavi
Copy link

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

@singhaje
Copy link

singhaje commented Feb 4, 2023

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

@moyakevin
Copy link

worked perfect for me

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

9 participants