2017-05-01 1 views
0

Bonjour, aidez-moi s'il vous plaît, je veux installer Dlib pour python sur les fenêtres, mais quand j'écris python.exe setup.py install cmd dans Dlib dir ou pip.exe install dlib je cette erreur:Erreur lors de l'installation Dlib sous Windows (pour python2)

CMake Warning at /usr/share/cmake-2.8.9/Modules/Platform/CYGWIN.cmake:15 (message): 
    CMake no longer defines WIN32 on Cygwin! 
    (1) If you are just trying to build this project, ignore this warning or 
    quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in 
    the CMake cache. If later configuration or build errors occur then this 
    project may have been written under the assumption that Cygwin is WIN32. 
    In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead. 
    (2) If you are developing this project, add the line 
    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required 
    at the top of your top-level CMakeLists.txt file or set the minimum 
    required version of CMake to 2.8.4 or higher. Then teach your project to 
    build on Cygwin without WIN32. 
Call Stack (most recent call first): 
    /usr/share/cmake-2.8.9/Modules/CMakeSystemSpecificInformation.cmake:36 (INCLUDE) 
-- Check for working C compiler: /usr/bin/gcc.exe 
-- Check for working C compiler: /usr/bin/gcc.exe -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Check for working CXX compiler: /usr/bin/c++.exe 
-- Check for working CXX compiler: /usr/bin/c++.exe -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
CMake Error at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED): 
    CMake 2.8.12 or higher is required. You are running version 2.8.9 
-- Configuring incomplete, errors occurred! 
error: cmake configuration failed! 

J'essaye de mettre à jour le cmake de cygwin avec le programme d'installation de Cygwin, mais setup.py utilise l'ancienne version de cmake (2.8.9). J'essaie de lancer setup.py à partir de la console de cygwin, mais il ne voit pas de Boost (mais il est installé sur mon ordinateur). J'ai cette erreur dans Cygwin:

-- Check for working C compiler: /usr/bin/cc 
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++.exe 
-- Check for working CXX compiler: /usr/bin/c++.exe -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
-- Detecting CXX compile features 
-- Detecting CXX compile features - done 
-- Could NOT find Boost 
CMake Error at /usr/share/cmake-3.3.2/Modules/FindPythonLibs.cmake:168 (file): 
    file STRINGS file 
    "/cygdrive/c/dlib-19.4/tools/python/C:/Python27/include/patchlevel.h" 
cannot be read. 
Call Stack (most recent call first): 
    /cygdrive/c/dlib-19.4/dlib/cmake_utils/add_python_module:75 (FIND_PACKAGE) 
    CMakeLists.txt:6 (include) 
CMake Error at /usr/share/cmake- 3.3.2/Modules/FindPackageHandleStandardArgs.cmake:148 (message): 
    Could NOT find PythonLibs: Found unsuitable version "", but required is at 
    least "2.6" (found C:/Python27/libs/python27.lib) 
Call Stack (most recent call first): 
    /usr/share/cmake-3.3.2/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE) 
    /usr/share/cmake-3.3.2/Modules/FindPythonLibs.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) 
    /cygdrive/c/dlib-19.4/dlib/cmake_utils/add_python_module:75 (FIND_PACKAGE) 
    CMakeLists.txt:6 (include) 
-- Configuring incomplete, errors occurred! 
error: cmake configuration failed! 

Puis-je mettre à jour le CMake de Cygwin pour l'utiliser dans cmd ou rendre le terminal du Cygwin pour voir Boost?

Répondre

1

Si vous avez anaconda vous pouvez essayer cette

Conda installer -c Menpo Dlib = 18,18

J'ai eu beaucoup de problèmes, quand j'ai essayé de l'installer avec pépin, mais avec Anaconda il était ok

+0

Merci, je vais essayer de le faire –

+0

Je suis désolé, peut-être que je ne pense pas bien, mais j'ai un problème avec Anaconda. Quand j'essaye d'exécuter conda.exe j'ai cette erreur. UnicodeDecodeError: le codec 'ascii' ne peut pas décoder l'octet 0xcd en position 15: ordinal pas dans la plage (128) J'ai Windows 7, x32 et 2.7 python. J'ai lu à propos de ce problème dans GitHub, mais toutes les façons de le résoudre ne fonctionnent pas avec moi. Aidez-moi, s'il vous plaît. –