Answer the question
In order to leave comments, you need to log in
Error while installing dlib?
It all started with the fact that I decided to put face_recognition (on Windows). When installing via pip, I got a huge error. As I found out later, it appeared exactly when installing dlib. I have read many forums. Now I already have Anaconda, cmake, cmake added to environment variables. All the same dlib is not downloaded. Tried through whl file again error. I don't know what to do anymore. Here is the error
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\AllPython\CVLearn\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvqw48ma\\dlib_4ae227b940e849b2b1d688b1c34f7100\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvqw48ma\\dlib_4ae227b940e849b2b1d688b1c34f7100\\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\Admin\AppData\Local\Temp\pip-record-o6k8937e\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\AllPython\CVLearn\venv\include\site\python3.9\dlib'
cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-rvqw48ma\dlib_4ae227b940e849b2b1d688b1c34f7100\
Complete output (60 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.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Admin\AppData\Local\Temp\pip-install-rvqw48ma\dlib_4ae227b940e849b2b1d688b1c34f7100\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Admin\AppData\Local\Temp\pip-install-rvqw48ma\dlib_4ae227b940e849b2b1d688b1c34f7100\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=C:\AllPython\CVLearn\venv\Scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Admin\AppData\Local\Temp\pip-install-rvqw48ma\dlib_4ae227b940e849b2b1d688b1c34f7100\build\lib.win-amd64-3.9 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rvqw48ma\dlib_4ae227b940e849b2b1d688b1c34f7100\setup.py", line 222, in <module>
setup(
File "C:\AllPython\CVLearn\venv\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\AllPython\CVLearn\venv\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rvqw48ma\dlib_4ae227b940e849b2b1d688b1c34f7100\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rvqw48ma\dlib_4ae227b940e849b2b1d688b1c34f7100\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvqw48ma\\dlib_4ae227b940e849b2b1d688b1c34f7100\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvqw48ma\\dlib_4ae227b940e849b2b1d688b1c34f7100\\build\\lib.win-amd64-3.9', '-DPYTHON_EXECUTABLE=C:\\AllPython\\CVLearn\\venv\\Scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvqw48ma\\dlib_4ae227b940e849b2b1d688b1c34f7100\\build\\lib.win-amd64-3.9', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\AllPython\CVLearn\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvqw48ma\\dlib_4ae227b940e849b2b1d688b1c34f7100\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvqw48ma\\dlib_4ae227b940e849b2b1d688b1c34f7100\\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\Admin\AppData\Local\Temp\pip-record-o6k8937e\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\AllPython\CVLearn\venv\include\site\python3.9\dlib' Check the logs for full command output.*
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question