-1

when I install dlib this error occurs. I have Microsoft visual c++ 15 installed and I use python 3.7

how to solve this problem

ERROR: Command errored out with exit status 1:

command: 'c:\users\arun\appdata\local\programs\python\python37\python.exe' -u -c 'import

sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Arun\AppData\Local\Temp\pip-ins

tall-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\setup.py'"'"'; file='"'"'C:\Users\

\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\set

up.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\

n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --reco

rd 'C:\Users\Arun\AppData\Local\Temp\pip-record-prlmpx1h\install-record.txt' --single-version

-externally-managed --compile --install-headers 'c:\users\arun\appdata\local\programs\python\

python37\Include\dlib'

cwd: C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df

02cb4f909e4b\

Complete output (57 lines):

running install

running build

running build_py

package init file 'tools\python\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, 10:41:24) [MSC

v.1900 64 bit (AMD64)]

Invoking CMake setup: 'cmake C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2

eee917da90a4678b1df02cb4f909e4b\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Arun\A

ppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\build\lib.win-am

d64-3.7 -DPYTHON_EXECUTABLE=c:\users\arun\appdata\local\programs\python\python37\python.exe -

DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_

\dlib_2eee917da90a4678b1df02cb4f909e4b\build\lib.win-amd64-3.7 -A x64'

-- Building for: Visual Studio 16 2019

-- Selecting Windows SDK version to target Windows 6.3.9600.

-- The C compiler identification is unknown

-- The CXX compiler identification is unknown

CMake Error at CMakeLists.txt:14 (project):

No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:14 (project):

No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred!

See also "C:/Users/Arun/AppData/Local/Temp/pip-install-lmmcwnu_/dlib_2eee917da90a4678b1df

02cb4f909e4b/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".

See also "C:/Users/Arun/AppData/Local/Temp/pip-install-lmmcwnu_/dlib_2eee917da90a4678b1df

02cb4f909e4b/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeError.log".

Traceback (most recent call last):

File "", line 1, in

File "C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02

cb4f909e4b\setup.py", line 262, in

'Topic :: Software Development',

File "c:\users\arun\appdata\local\programs\python\python37\lib\site-packages\setuptools

_init_.py", line 145, in setup

return distutils.core.setup(**attrs)

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\core.py", line

148, in setup

dist.run_commands()

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\dist.py", line

966, in run_commands

self.run_command(cmd)

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run()

File "c:\users\arun\appdata\local\programs\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self)

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\command\install.py", line 545, in run

self.run_command('build')

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command

self.distribution.run_command(command)

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run()

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name)

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command)

File "c:\users\arun\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command

cmd_obj.run()

File "C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\setup.py", line 135, in run self.build_extension(ext)

File "C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\setup.py", line 172, in build_extension

subprocess.check_call(cmake_setup, cwd=build_folder)

File "c:\users\arun\appdata\local\programs\python\python37\lib\subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['cmake', 'C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\build\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=c:\users\arun\appdata\local\programs\python\python37\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02c

b4f909e4b\build\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.


ERROR: Command errored out with exit status 1: 'c:\users\arun\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\setup.py'"'"'; file='"'"'C:\Users\Arun\AppData\Local\Temp\pip-install-lmmcwnu_\dlib_2eee917da90a4678b1df02cb4f909e4b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file,

'"'"'exec'"'"'))' install --record 'C:\Users\Arun\AppData\Local\Temp\pip-record-prlmpx1h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\arun\appdata\local\programs\python\python37\Include\dlib' Check the logs for full command output.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Arun
  • 1
  • 1
  • Arun, the error message is too difficult to read. Can you please copy and paste as is. This looks like the data was copied, edited, and pasted. Also can you please explain what you have tried (steps) instead of just sharing the error message. – Joe Ferndz Jan 08 '21 at 19:47
  • sorry for the difficulties this is my first question in stacks overflow. I installed Cmake but I didn't know how to set up it. and I have visual c++ 15 installed too, and also I tried to install it in different versions of python like 3.8,3.6.3,7 but the same message comes. does having windows 8.1 is a problem?and also I use pycharm.and I just copied and pasted the error. I didn't edit it. thanks for the reply :) – Arun Jan 09 '21 at 04:46

1 Answers1

0

The issue is that you're missing a usable compiler toolchain. First get Cmake and set that up, then give it another shot.

Zac Anger
  • 6,983
  • 2
  • 15
  • 42
  • dude, I installed CMake but how to setup it? is there any article about it? or can u tell me the steps involved? – Arun Jan 09 '21 at 04:52
  • @Arun check the top answer here: https://stackoverflow.com/questions/32801638/cmake-error-at-cmakelists-txt30-project-no-cmake-c-compiler-could-be-found It's a few years old now but should be helpful – Zac Anger Jan 09 '21 at 16:35