how to solve this problem. when i want to install dlib on terminal, i found this message

  cmake, pip, python, python-3.x

Collecting dlib
Using cached dlib-19.21.1.tar.gz (3.6 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py’"’"’; file=’"’"’/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py’"’"’;f=getattr(tokenize, ‘"’"’open’"’"’, open)(file);code=f.read().replace(‘"’"’rn’"’"’, ‘"’"’n’"’"’);f.close();exec(compile(code, file, ‘"’"’exec’"’"’))’ bdist_wheel -d /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-wheel-x_t2nmyj
cwd: /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/
Complete output (72 lines):
running bdist_wheel
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.1 (v3.9.1:1e5d33e9b9, Dec 7 2020, 12:10:52)
Invoking CMake setup: ‘cmake /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/build/lib.macosx-10.9-x86_64-3.9 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -DCMAKE_BUILD_TYPE=Release’
— The C compiler identification is AppleClang 11.0.3.11030032
— The CXX compiler identification is AppleClang 11.0.3.11030032
— Detecting C compiler ABI info
— Detecting C compiler ABI info – done
— Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc – skipped
— Detecting C compile features
— Detecting C compile features – done
— Detecting CXX compiler ABI info
— Detecting CXX compiler ABI info – done
— Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ – skipped
— Detecting CXX compile features
— Detecting CXX compile features – done
CMake Error at /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:60 (find_package):
By not providing "FindPythonInterp.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"PythonInterp", but CMake did not find one.

Could not find a package configuration file provided by "PythonInterp" with
any of the following names:

  PythonInterpConfig.cmake
  pythoninterp-config.cmake

Add the installation prefix of "PythonInterp" to CMAKE_PREFIX_PATH or set
"PythonInterp_DIR" to a directory containing one of the above files.  If
"PythonInterp" provides a separate development package or SDK, be sure it
has been installed.

Call Stack (most recent call first):
/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/dlib/external/pybind11/CMakeLists.txt:33 (include)

— Configuring incomplete, errors occurred!
See also "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/build/temp.macosx-10.9-x86_64-3.9/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py", line 223, in
setup(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/init.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command(‘build’)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py", line 135, in run
self.build_extension(ext)
File "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/tools/python’, ‘-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/build/lib.macosx-10.9-x86_64-3.9’, ‘-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.9/bin/python3’, ‘-DCMAKE_BUILD_TYPE=Release’]’ 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: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py’"’"’; file=’"’"’/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py’"’"’;f=getattr(tokenize, ‘"’"’open’"’"’, open)(file);code=f.read().replace(‘"’"’rn’"’"’, ‘"’"’n’"’"’);f.close();exec(compile(code, file, ‘"’"’exec’"’"’))’ install –record /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-record-et6on9mj/install-record.txt –single-version-externally-managed –compile –install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/dlib
cwd: /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/
Complete output (74 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.1 (v3.9.1:1e5d33e9b9, Dec 7 2020, 12:10:52)
Invoking CMake setup: ‘cmake /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/build/lib.macosx-10.9-x86_64-3.9 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -DCMAKE_BUILD_TYPE=Release’
— The C compiler identification is AppleClang 11.0.3.11030032
— The CXX compiler identification is AppleClang 11.0.3.11030032
— Detecting C compiler ABI info
— Detecting C compiler ABI info – done
— Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc – skipped
— Detecting C compile features
— Detecting C compile features – done
— Detecting CXX compiler ABI info
— Detecting CXX compiler ABI info – done
— Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ – skipped
— Detecting CXX compile features
— Detecting CXX compile features – done
CMake Error at /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:60 (find_package):
By not providing "FindPythonInterp.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"PythonInterp", but CMake did not find one.

  Could not find a package configuration file provided by "PythonInterp" with
  any of the following names:

    PythonInterpConfig.cmake
    pythoninterp-config.cmake

  Add the installation prefix of "PythonInterp" to CMAKE_PREFIX_PATH or set
  "PythonInterp_DIR" to a directory containing one of the above files.  If
  "PythonInterp" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
  /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/dlib/external/pybind11/CMakeLists.txt:33 (include)


-- Configuring incomplete, errors occurred!
See also "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/build/temp.macosx-10.9-x86_64-3.9/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py", line 223, in <module>
    setup(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/install.py", line 546, in run
    self.run_command('build')
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py", line 135, in run
    self.build_extension(ext)
  File "/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py", line 172, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/build/lib.macosx-10.9-x86_64-3.9', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.9/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py’"’"’; file=’"’"’/private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-install-mmegg__9/dlib_392865763f6a43f198a447058c734b19/setup.py’"’"’;f=getattr(tokenize, ‘"’"’open’"’"’, open)(file);code=f.read().replace(‘"’"’rn’"’"’, ‘"’"’n’"’"’);f.close();exec(compile(code, file, ‘"’"’exec’"’"’))’ install –record /private/var/folders/nz/08lgzr493wd_6l7vmyz32n2h0000gn/T/pip-record-et6on9mj/install-record.txt –single-version-externally-managed –compile –install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/dlib Check the logs for full command output.

Source: Python-3x Questions

One Reply to “how to solve this problem. when i want to install dlib on terminal, i found this message”

LEAVE A COMMENT