OpenCV Python Building wheel for dlib (setup.py)

柔情痞子 提交于 2020-01-25 02:03:04

问题


I am trying to install face_recognition on Ubuntu.

I keep running into this loop, which goes on forever. Please help.

pip install face_recognition
Collecting face_recognition
  Using cached https://files.pythonhosted.org/packages/3f/ed/ad9a28042f373d4633fc8b49109b623597d6f193d3bbbef7780a5ee8eef2/face_recognition-1.2.3-py2.py3-none-any.whl
Collecting Pillow (from face_recognition)
  Using cached https://files.pythonhosted.org/packages/c1/e6/ce127fa0ac17775bc7887c432ffe945c49ae141f01b477b7cd5e63b16bb5/Pillow-6.0.0-cp37-cp37m-manylinux1_x86_64.whl
Requirement already satisfied: numpy in ./.virtualenvs/cv/lib/python3.7/site-packages (from face_recognition) (1.16.3)
Collecting Click>=6.0 (from face_recognition)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting face-recognition-models>=0.3.0 (from face_recognition)
Collecting dlib>=19.7 (from face_recognition)
  Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Building wheels for collected packages: dlib
  Building wheel for dlib (setup.py) .

回答1:


this is my step-by-step solution

    apt-get update
    apt-get install build-essential cmake
    apt-get install libopenblas-dev liblapack-dev 
    apt-get install libx11-dev libgtk-3-dev
    apt-get install python python-dev python-pip
    apt-get install python3 python3-dev python3-pip

then install dlib

    cd ~
    mkdir temp
    cd temp
    git clone https://github.com/davisking/dlib.git
    cd dlib
    mkdir build; cd build; cmake ..; cmake --build .
    cd ..
    python3 setup.py install

then install face_recognition

    pip3 install numpy scipy matplotlib pandas face_recognition



回答2:


Although I don't know the cause of the loop, I found a workaround by creating a (Anaconda) container with python version 3.6.9 (whereas at first I tried to install face_recognition with python version 3.7.3. Hope it helps.



来源:https://stackoverflow.com/questions/56051515/opencv-python-building-wheel-for-dlib-setup-py

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!