Home python How to install DLIB?

How to install DLIB?

Author

Date

Category

When using the command:

pip install dlib

gives an error:

"c: \ users \ eezbe \ appdata \ Local \ Programs \ Thonny \ lib \ distutils \ dist.py" , Line 966, in Run_Commands
Self.Run_Command (CMD)
File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ THONNY \ LIB \ Distils \ Dist.py", Line 985, in Run_Command
cmd_obj.run ()
File "C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Lib \ Site-Packages \ SetupTools \ Command \ Install.py", Line 61, in Run
Return orig.install.run (SELF)
File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Command \ Install.py", Line 545, in Run
Self.Run_Command ('Build')
File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Cmd.py", Line 313, in Run_Command
self.distribution.Run_Command (Command)
File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ THONNY \ LIB \ Distils \ Dist.py", Line 985, in Run_Command
cmd_obj.run ()
File "C: \ Users \ Eezbe \ AppData \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Command \ Build.py", Line 135, in Run
Self.Run_Command (CMD_NAME)
File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Cmd.py", Line 313, in Run_Command
self.distribution.Run_Command (Command)
File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ THONNY \ LIB \ Distils \ Dist.py", Line 985, in Run_Command
cmd_obj.run ()
File "C: \ Users \ Eezbe \ AppData \ Local \ temp \ pip-install-kcgx0v3t \ dlib \ setup.py", Line 135, in Run
Self.Build_Extension (EXT)
File "C: \ Users \ Eezbe \ AppData \ Local \ temp \ pip-install-kcgx0v3t \ dlib \ setup.py", Line 172, in build_extension
subprocess.check_call (CMake_Setup, CWD = BUILD_FOLDER)
File "C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Lib \ subprocess.py", Line 363, In Check_call
RAISE CALLEDPROCESSERROR (Retcode, CMD)
subprocess.calledProcesseRor: Command '[' Cmake ',' C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ Pip-Install-KCGX0V3T \\ Dlib \\ Tools \\ Python ',' -Dcmake_Library_output_Directory = C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ Pip-Install-KCGX0V3T \\ Dlib \\ Build \\ Lib.win32-3.7 ',' -Dpython_executable = C: \\ Users \ \ Eezbe \\ AppData \\ Local \\ Programs \\ Thonny \\ python.exe ',' -dcmake_Library_output_Directory_Release = C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ Pip-Install-KCGX0V3T \ \ dlib \\ Build \\ lib.win32-3.7 ']' Returned non-Zero Exit Status 1.
---------------------------------------
Error: Command Erroored Out With Exit Status 1: 'C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Python.exe' -u -c 'Import Sys, SetupTools, Tokenize; sys.argv [0] = '"'" 'C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ PIP-Install-KCGX0V3T \\ Dlib \\ setup.py' "" "; __File __ = '"" "' C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ PIP-Install-KCGX0V3T \\ dlib \\ setup.py '"' "'; F = GetAttr (Tokenize , '""' 'Open' '' '', Open) (__ File __); code = f.read (). Replace ('"' '' \ r \ n '' '' ','" '"\ \ n '"'" "); F.Close (); Exec (Code, __File__, '"' "'Exec'" '"')) 'Install -Record' C: \ Users \ Eezbe \ AppData \ Local \ Temp \ Pip-Record-6Joaylx3 \ Install-Record.txt '-single-Version-Externally-Managed -Compile -install-Headers' C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Include \ Dlib' Check The Logs for Full Command Output.

How can I fix it?


UPD

collecting dlib
 Using Cached DLIB-19.20.0.tar.gz (3.2 MB)
Using Legacy Setup.py Install for Dlib, Since Package 'Wheel' Is Not Installed.
Installing Collected Packages: Dlib
  Running Setup.py Install for Dlib ... Error
  Error: Command Erroored Out with Exit Status 1:
   Command: 'C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Python.exe' -u -c 'Import Sys, SetupTools, Tokenize; sys.argv [0] = '"'" "'C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ PIP-Install-IzoQttv6 \\ dlib \\ setup.py'" '"'; __File __ = '"" "' C: \\ Users \\ EeZBE \\ AppData \\ Local \\ temp \\ pip-install-izoqttv6 \\ dlib \\ setup.py '"' "'; F = GetAttr (Tokenize , '""' 'Open' '' '', Open) (__ File __); code = f.read (). Replace ('"' '' \ r \ n '' '' ','" '"\ \ n '"'" '); F.Close (); Exec (Code, __File__,' "'"' Exec '"'" '))' Install --record 'C: \ Users \ Eezbe \ APPDATA \ Local \ Temp \ Pip-Record-4Ohgzi59 \ Install-Record.txt '--Single-Version-Externally-Managed --compile --install-Headers' C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Include \ dlib ' 
CWD: C: \ Users \ Eezbe \ APPDATA \ LOCAL \ temp \ pip-install-izoqttv6 \ dlib \
  COMPLETE OUTPUT (65 Lines):
  Running Install
  Running Build
  Running Build_py.
  Package Init File 'Dlib \ __ init__.py' Not Found (or not a regular file)
  Running Build_EXT.
  Building Extension for Python 3.7.7 (tags / v3.7.7: D7C567B08F, Mar 10 2020, 09:44:33) [MSC V.1900 32 Bit (Intel)]
  INVOKING CMAKE SETUP: 'CMake C: \ Users \ Eezbe \ AppData \ Local \ temp \ pip-install-izoqttv6 \ dlib \ tools \ python -dcmake_library_output_directory = c: \ users \ Eezbe \ AppData \ Local \ temp \ pip-install izoqttv6 \ dlib \ build \ lib.win32-3.7 -dpython_executable = c: \ users \ eezbe \ appdata \ Local \ Programs \ thonny \ python.exe -dcmake_library_output_directory_release = c: \ users \ eezbe \ appdata \ local \ temp \ pip- Install-izoqttv6 \ dlib \ build \ lib.win32-3.7 '
  - Building for: Visual Studio 16 2019
  - The C Compiler Identification IS MSVC 19.26.28806.0
  - The Cxx Compiler Identification IS MSVC 19.26.28806.0
  - Check for Working C Compiler: C: / Program Files (X86) / Microsoft Visual Studio / 2019 / Professional / VC / Tools / MSVC / 14.26.28801 / BIN / HOSTX64 / X64 / CL.exe
  - Check for Working C Compiler: C: / Program Files (X86) / Microsoft Visual Studio / 2019 / Professional / VC / Tools / MSVC / 14.26.28801 / BIN / HOSTX64 / X64 / CL.EXE - Works
  - Detecting C Compiler ABI INFO
  - Detending C Compiler ABI INFO - DONE
  - Detending C Compile Features
  - Detecting C Compile Features - Done
  - Check for Working CXX Compiler: C: / Program Files (X86) / Microsoft Visual Studio / 2019 / Professional / VC / Tools / MSVC / 14.26.28801 / BIN / HOSTX64 / X64 / CL.exe
  - Check for Working CXX Compiler: C: / Program Files (X86) / Microsoft Visual Studio / 2019 / Professional / VC / Tools / MSVC / 14.26.28801 / BIN / HOSTX64 / X64 / CL.EXE - Works
  - Detecting CXX Compiler ABI INFO
  - Detecting CXX Compiler ABI INFO - DONE
  - Detecting Cxx Compile Features
  - Detecting Cxx Compile Features - Done
  - Found Pythoninterp: c: /users/eezbe/appdata/local/programs/thonny/python.exe (Found Version "3.7.7")
  Cmake error at c: /users/eezbe/pipdata/local/temp/pip-install-izoqtttv6/dlib/dlib/external/pybind11/tools/findpythonlibsnew.cmake: 124 (Message):
   Python Config Failure: Python IS 32-bit, Chosen Compiler IS 64-bit
  Call Stack (MOST Recent Call First):
   C: /users/eezbe/ppdata/local/temp/pip-install-izoqttv6/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake: 16 (find_package)
   C: /users/eezbe/ppdata/local/temp/pip-install-izoqtttv6/dlib/dlib/external/pybind11/cmakelists.txt: 33 (Include)
  - Configuring Incomplete, Errors Occurred!
  See Also "c: /users/eezbe/pipdata/local/temp/pip-install-izoqtttv6/dlib/build/temp.win32-3.7/release/cmakefiles/cmakeoutput.log".
  Traceback (MOST Recent Call Last):
   File "& lt; string & gt;", line 1, in & lt; module & gt;
   File "C: \ Users \ Eezbe \ AppData \ Local \ temp \ pip-install-izoqttv6 \ dlib \ setup.py", Line 261, in & lt; module & gt;
    'Topic :: Software Development',
   File "C: \ Users \ Eezbe \ AppData \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Site-Packages \ SetupTools \ __ init__.py", line 145, in setup
    Return Distutils.core.Setup (** ATTRS)
   File "C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Lib \ Distils \ Core.py", Line 148, In Setup
    Dist.Run_Commands ()
   File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ THONNY \ LIB \ Distils \ Dist.py", Line 966, in Run_Commands
    Self.Run_Command (CMD)
   File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ THONNY \ LIB \ Distils \ Dist.py", Line 985, in Run_Command
    cmd_obj.run ()
   File "C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Lib \ Site-Packages \ SetupTools \ Command \ Install.py", Line 61, in Run
    Return orig.install.run (SELF)
   File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Command \ Install.py", Line 545, in Run
    Self.Run_Command ('Build')
   File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Cmd.py", Line 313, in Run_Command
    self.distribution.Run_Command (Command)
   File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ THONNY \ LIB \ Distils \ Dist.py", Line 985, in Run_Command
    cmd_obj.run ()
   File "C: \ Users \ Eezbe \ AppData \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Command \ Build.py", Line 135, in Run
    Self.Run_Command (CMD_NAME) 
File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ Thonny \ Lib \ Distils \ Cmd.py", Line 313, in Run_Command
    self.distribution.Run_Command (Command)
   File "C: \ Users \ Eezbe \ APPDATA \ LOCAL \ PROGRAMS \ THONNY \ LIB \ Distils \ Dist.py", Line 985, in Run_Command
    cmd_obj.run ()
   File "C: \ Users \ Eezbe \ AppData \ Local \ temp \ pip-install-izoqttv6 \ dlib \ setup.py", Line 135, in Run
    Self.Build_Extension (EXT)
   File "C: \ Users \ Eezbe \ APPDATA \ Local \ temp \ pip-install-izoqttv6 \ dlib \ setup.py", Line 172, in build_extension
    subprocess.check_call (CMake_Setup, CWD = BUILD_FOLDER)
   File "C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Lib \ subprocess.py", Line 363, In Check_call
    RAISE CALLEDPROCESSERROR (Retcode, CMD)
  subprocess.calledProcesserror: Command '[' CMake ',' C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ Pip-Install-izoQtttv6 \\ dlib \\ Tools \\ Python ',' -Dcmake_Library_output_Directory = C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ pip-install-izoqttv6 \\ dlib \\ Build \\ Lib.win32-3.7 ',' -dpython_executable = C: \\ Users \ \ EeZBE \\ AppData \\ Local \\ Programs \\ Thonny \\ python.exe ',' -Dcmake_Library_output_Directory_Release = C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ Pip-Install-izoQTTV6 \ \ dlib \\ Build \\ lib.win32-3.7 ']' Returned non-Zero Exit Status 1.
  ------------------------------------------
Error: Command Erroored Out With Exit Status 1: 'C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Python.exe' -u -c 'Import Sys, SetupTools, Tokenize; sys.argv [0] = '"'" "'C: \\ Users \\ EeZBE \\ AppData \\ Local \\ Temp \\ PIP-Install-IzoQttv6 \\ dlib \\ setup.py'" '"'; __File __ = '"" "' C: \\ Users \\ EeZBE \\ AppData \\ Local \\ temp \\ pip-install-izoqttv6 \\ dlib \\ setup.py '"' "'; F = GetAttr (Tokenize , '""' 'Open' '' '', Open) (__ File __); code = f.read (). Replace ('"' '' \ r \ n '' '' ','" '"\ \ n '"'" '); F.Close (); Exec (Code, __File__,' "'"' Exec '"'" '))' Install --record 'C: \ Users \ Eezbe \ APPDATA \ Local \ Temp \ Pip-Record-4Ohgzi59 \ Install-Record.txt '--Single-Version-Externally-Managed --compile --install-Headers' C: \ Users \ Eezbe \ AppData \ Local \ Programs \ Thonny \ Include \ Dlib 'Check The Logs for Full Command Output.

Answer 1, Authority 100%

Cause of the error is clearly indicated here:

Python Config Failure: Python Is 32-bit, Chosen Compiler IS 64-bit

Get Studio, Python and all installed modules were one bit.


Answer 2

Pip Install Cmake
Pip Install Dlib.

Try this


Answer 3

Make sure you have CMake and set in a variable environment (a bunch of rollers and articles on how to install CMake), as well as I advise you to install Windows SDK
(Look on the Internet)

and you can install boosts (if = 3)

but if you are sure that you have all this, then ..

https://github.com/charlielito/install-dlib-python-windows To help.

In short, follow the link: https://pypi.org/simple/dlib/
Download DLIB-19.21.0.tar.gz (right button, open in a new window).
After unzipping and go to the folder where you unpacked using the command line
And write py -3 setup.py install or if it does not work Python Setup.py Install
(Do not forget that you need to enter this command while being in the folder)

Here are screenshots. It may be so easier for someone to understand = 3

Go to the folder and start setting setup.py through the console using the command marked above or in the zone 2 in the image

In order to make sure that the installation has passed successfully enter the console in the PY-3 interpreter>PY-3 or Python and import the DLIB module if there are no errors, then all installation has passed Successful!

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions