1

У меня проблема с установкой dlib в Windows 10 (x64) с Python 2.7.15 (x64).

Я получаю ошибку:

Ошибка конфигурации Python: Python 216-битный, выбранный компилятор 64-битный

Я не знаю причину, почему Python говорит, что это 216 бит.

Collecting dlib
  Using cached https://files.pythonhosted.org/packages/35/8d/e4ddf60452e2fb1ce3164f774e68968b3f110f1cb4cd353235d56875799e/dlib-19.16.0.tar.gz
Installing collected packages: dlib
  Running setup.py install for dlib: started
    Running setup.py install for dlib: finished with status 'error'
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\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\CARLOS\appdata\local\temp\pip-record-qwail8\install-record.txt --single-version-externally-managed --compile:
    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 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
    Invoking CMake setup: 'cmake c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\build\lib.win-amd64-2.7 -DPYTHON_EXECUTABLE=c:\python27\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\build\lib.win-amd64-2.7 -A x64'
    -- Building for: Visual Studio 15 2017
    -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
    -- The C compiler identification is MSVC 19.16.27025.1
    -- The CXX compiler identification is MSVC 19.16.27025.1
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/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:/Python27/python.exe (found version "2.7.15")
    CMake Error at C:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:122 (message):
      Python config failure: Python is 216-bit, chosen compiler is 64-bit
    Call Stack (most recent call first):
      C:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
      C:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/dlib/external/pybind11/CMakeLists.txt:33 (include)

-- Configuring incomplete, errors occurred!
See also "C:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/build/temp.win-amd64-2.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\setup.py", line 257, in <module>
    'Topic :: Software Development',
  File "c:\Python27\lib\site-packages\setuptools\__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "c:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "c:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\Python27\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\Python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\setup.py", line 133, in run
    self.build_extension(ext)
  File "c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\setup.py", line 170, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "c:\Python27\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'c:\\users\\CARLOS\\appdata\\local\\temp\\pip-install-ttcjss\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\\users\\CARLOS\\appdata\\local\\temp\\pip-install-ttcjss\\dlib\\build\\lib.win-amd64-2.7', '-DPYTHON_EXECUTABLE=c:\\python27\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\\users\\CARLOS\\appdata\\local\\temp\\pip-install-ttcjss\\dlib\\build\\lib.win-amd64-2.7', '-A', 'x64']' returned non-zero exit status 1

0