Failed building wheel for dlib

本人想安裝python用的dlib和face_recognition組件,但是真想說xxx,網上說了很多辦法,什麼anaconda,cmake編譯boost。。。

可能我這裏的版本不一樣吧,我現在用的是win7 64bit python2.7 visual studio2010,用pip安裝

pip install dlib
pip install face_recognition

全是報錯誤

Running setup.py bdist_wheel for dlib ... 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

。。。

  -- Building for: Visual Studio 10 2010
  -- The C compiler identification is MSVC 16.0.30319.1
  -- The CXX compiler identification is MSVC 16.0.30319.1
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studi
o 10.0/VC/bin/x86_amd64/cl.exe
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studi
o 10.0/VC/bin/x86_amd64/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 Stu
dio 10.0/VC/bin/x86_amd64/cl.exe
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Stu
dio 10.0/VC/bin/x86_amd64/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")
  -- Found PythonLibs: C:/Python27/libs/Python27.lib
  -- pybind11 v2.2.2
  -- Using CMake version: 3.12.0
  -- Compiling dlib version: 19.15.0
  CMake Error at C:/Users/Administrator/AppData/Local/Temp/pip-install-tkz7hs/dl
ib/dlib/cmake_utils/set_compiler_specific_options.cmake:27 (message):
    C++11 is required to use dlib, but the version of Visual Studio you are
    using is too old and doesn't support C++11.  You need Visual Studio 2015 or
    newer.

本人是visual studio 2010 老是提示更新安裝2015,不想安裝,2010用的挺好的,再說以前的好多工程都是2010搞得,怕升到2015兼容不好,就麻煩了,於是乎我就利用網友的辦法,什麼anaconda 、cmake。。。 總之一步十個跪,最終經過兩天的折磨還是妥協了。。。

用半個小時時間裝完2015,在pip install face_recognition 竟然ok了。好想罵人。。。

這裏mark一下:有時候還是要尊重錯誤提示,有時候錯誤日誌提示可能對你來說不是最好的解決方法,但是可能確實最快的。

ps:更新完成face_recognition 和dlib  就把2015 卸掉了,哈哈哈

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章