Giter Club home page Giter Club logo

Comments (6)

ageitgey avatar ageitgey commented on May 2, 2024

That sounds like you have a version mismatch with the version of gcc used to compile everything. I honestly haven't seen anything like that happen before with Ubuntu 16.04. But I also don't use Anaconda, so I'm guessing it's related to that? I'm not really sure.

from face_recognition.

creativeishu avatar creativeishu commented on May 2, 2024

Actually, I am running this on a docker image that I configured using following Dockerfile:

FROM ubuntu:latest
RUN apt-get update
RUN apt-get install wget -y

FROM continuumio/anaconda:latest
RUN apt-get install python-pip python-dev -y
RUN pip install --upgrade pip

RUN pip install theano tensorflow keras
RUN pip install fasttext

RUN apt-get install build-essential cmake pkg-config libgtk2.0-dev python-tk -y
RUN pip install opencv-python

RUN apt-get install nano vim -y

RUN conda install -c menpo dlib=18.18
RUN pip install face_recognition

Do you see any package I am missing here?

from face_recognition.

ageitgey avatar ageitgey commented on May 2, 2024

Yes. Menpo's dlib 18.18 is way too old. It won't work for this. Check out the Dockerfile in this project.

from face_recognition.

creativeishu avatar creativeishu commented on May 2, 2024

I re-tried building with the following docker file:

FROM ubuntu:latest
RUN apt-get update
RUN apt-get install wget -y

FROM continuumio/anaconda:latest
RUN apt-get install python-pip python-dev -y
RUN pip install --upgrade pip

RUN pip install theano tensorflow keras
RUN pip install fasttext

RUN apt-get install build-essential cmake pkg-config libgtk2.0-dev python-tk -y
RUN pip install opencv-python

RUN apt-get install nano vim -y

RUN apt-get install libboost-all-dev -y
RUN pip install dlib
RUN pip install face_recognition

This time it installed dlib version 19.4.0. But this didn't solve the problem. I am still getting the same error.

>>> import face_recognition
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python2.7/site-packages/face_recognition/__init__.py", line 7, in <module>
    from .api import load_image_file, face_locations, face_landmarks, face_encodings, compare_faces
  File "/opt/conda/lib/python2.7/site-packages/face_recognition/api.py", line 4, in <module>
    import dlib
  File "/opt/conda/lib/python2.7/site-packages/dlib/__init__.py", line 1, in <module>
    from .dlib import *
ImportError: /opt/conda/lib/python2.7/site-packages/dlib/dlib.so: undefined symbol: _ZSt24__throw_out_of_range_fmtPKcz

from face_recognition.

ageitgey avatar ageitgey commented on May 2, 2024

It seems related to how the Anaconda packages where built. I'm not very familiar with Anaconda, so I don't really know for sure.

Did you try the Dockerfile in this repo? Did that one work for you?

from face_recognition.

Kalkidan45 avatar Kalkidan45 commented on May 2, 2024

hey there can u please tell me how i can import the face_recognition module?

from face_recognition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.