[Bug]: i need help to install dlib
margo2130 opened this issue · 3 comments
What Operating System(s) are you seeing this problem on?
Windows
dlib version
i don't know
Python version
3.8.0
Compiler
i don't know
Expected Behavior
problem
Current Behavior
when i install this
pip install dlib
it give a long error:
C:\Users\Hadi.M>pip install dlib
Collecting dlib
Using cached dlib-19.24.6.tar.gz (3.4 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\hadi.m\appdata\local\programs\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\setup.py'"'"'; __file__='"'"'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Hadi.M\AppData\Local\Temp\pip-wheel-no9dya16'
cwd: C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\
Complete output (51 lines):
running bdist_wheel
running build
running build_ext
Building extension for Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\build\lib.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\users\hadi.m\appdata\local\programs\python\python38\python.exe -DDLIB_USE_FFMPEG=OFF -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\build\lib.win-amd64-3.8 -A x64'
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- 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!
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\setup.py", line 243, in <module>
setup(
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\site-packages\wheel\_bdist_wheel.py", line 378, in run
self.run_command("build")
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\setup.py", line 168, in run
self.build_extension(ext)
File "C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\setup.py", line 206, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\hadi.m\\appdata\\local\\programs\\python\\python38\\python.exe', '-DDLIB_USE_FFMPEG=OFF', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\build\\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\hadi.m\appdata\local\programs\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\setup.py'"'"'; __file__='"'"'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Hadi.M\AppData\Local\Temp\pip-record-mk3t2pzf\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hadi.m\appdata\local\programs\python\python38\Include\dlib'
cwd: C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\
Complete output (53 lines):
running install
running build
running build_ext
Building extension for Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\build\lib.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\users\hadi.m\appdata\local\programs\python\python38\python.exe -DDLIB_USE_FFMPEG=OFF -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\build\lib.win-amd64-3.8 -A x64'
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- 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!
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\setup.py", line 243, in <module>
setup(
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\setup.py", line 168, in run
self.build_extension(ext)
File "C:\Users\Hadi.M\AppData\Local\Temp\pip-install-coqhec1l\dlib_22ddd70e8b3f40f79e9038231336c834\setup.py", line 206, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\hadi.m\appdata\local\programs\python\python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\hadi.m\\appdata\\local\\programs\\python\\python38\\python.exe', '-DDLIB_USE_FFMPEG=OFF', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\build\\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\hadi.m\appdata\local\programs\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\setup.py'"'"'; __file__='"'"'C:\\Users\\Hadi.M\\AppData\\Local\\Temp\\pip-install-coqhec1l\\dlib_22ddd70e8b3f40f79e9038231336c834\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Hadi.M\AppData\Local\Temp\pip-record-mk3t2pzf\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hadi.m\appdata\local\programs\python\python38\Include\dlib' Check the logs for full command output.
WARNING: You are using pip version 21.1.1; however, version 24.2 is available.
You should consider upgrading via the 'c:\users\hadi.m\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.
Steps to Reproduce
problme
Anything else?
problme
Looks like you just haven't installed visual C++ is all. When you install visual studio it will ask what you want to install and you have to say to install C++ support.
Warning: this issue has been inactive for 35 days and will be automatically closed on 2024-11-19 if there is no further activity.
If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.