Installing dlib with python3.6 in Jetson Nano

Hi

I am trying to install dlib for which I have already installed cmake.
cmake --version

cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

After issuing command : pip3 install dlib
It keeps on building wheel for dlib. I waited to ~1hr but it didnt installed and was just showing building wheel for dlib. The nano however got freezed and wasnt responding so I restarted it but dlib was not installed.

How to properly installed dlib. Does the installtion takes this much time.?

Thanks

Hi,

Please wait it longer.
It really takes time since there are many dependencies need to be installed or compiled.

Thanks.

Hello,

same problem here. I tried

pip3 install face_recognition

I let finish the installation overnight and it ends always with the same error.

Failed building wheel for dlib

and

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7g584gv/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 /tmp/pip-b072g57w-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-g7g584gv/dlib/

I had to build it from source and it took more than 2hr to install but dlib and face_recognition both are installed.

Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import dlib
dlib.version
‘19.17.99’

import face_recognition

face_recognition.version
‘1.2.3’

But there is no point of using face_recognition on nano as it seems not to be working fine. It only detect face and not recognize them. While everything seems to be working fine on windows 10 laptop. I think its because of dlib issues. I have read in some other threads that dlib do not work properly on nano. I will try again.

On Raspberry Pi 3 dlib and face recognition works pretty well, but with low performance.

I have still trouble installing face_recognition.
I installed dlib from source with cmake with no errors.

wget http://dlib.net/files/dlib-19.17.tar.bz2
tar xvf dlib-19.17.tar.bz2
cd dlib-19.17/
mkdir build
cd build
cmake ..
cmake --build . --config Release
sudo make install
sudo ldconfig

then i installed it with python, no errors.

cd dlib-19.17
python setup.py install

but when i exec

python3
import dlib
dlib.__version__

I get the error: module ‘dlib’ has no attribute +‘version

pip3 install face_recognition

is still failing.

I need help.
Thx for advice.

I am still stuck on that problem.

Hi,

We can install dlib/face_recognition with this command:

pip3 install face_recognition

It looks like some issue in your dlib now.
Would you mind to reflash your device and install dlib with the command here:
https://devtalk.nvidia.com/default/topic/1049660/jetson-nano/issues-with-dlib-library/post/5336330/#5336330

This version also fixes a bug in face_encodings.
Thanks.

Ok, i increased the swapfile to 4GB and the Installation completed with no Errors.

Good to know this.
It looks like you are suffered from the out of memory issue.

Thanks.