Issues with dlib on Jetson Nano 2gb

Hi there,
I just got a jetson nano 2gb and tried to follow this guide to for facial recognition.

My issue is that “face_recognition” kept giving me "segmentation fault (core dumped) error. Then I tried to import dlib, however it gave "illegal instruction (core dumped). I’ve since then tried many different solutions including exporting Openblas, building dlib from source but none of them worked. According to the guide, it should’ve worked but it just didn’t work for me at all. I am currently using the latest jetpack 4.6 and I am pretty sure I downloaded the correct image. Please help thank you.


Could you check which numpy version do you use?
For example:

$ python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__

It’s known that numpy 1.19.x will cause an ‘illegal instruction’ error.
Could you reinstall the v1.18.5 and try it again?

$ sudo pip3 install -U numpy==1.18.5


My numpy version is “1.13.3”. I have no idea why. I followed everything on the guide, without installing additional packages. I use the latest jetpack for nano 2gb, and that’s the default numpy version. I am now trying to upgrade numpy to 1.18.5. Is there anything that I should take note of?

**I did the upgrade for numpy to version 1.18.5. Unfortunately it still give me the same error. I would like to add that for the first import I tried for “dlib”, the system showed python crashing as well.

For what its worth, I’m having the exact same issue… nothing to add, just a seg fault when I try and import dlib. I’ve compiled dlib before (other architectures), but I dont have time for that struggle in the next few days.

Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
Segmentation fault (core dumped)
1 Like

Yup exact same issue. Not sure which python package is having issue this time around. Tried with Jetpack 4.3 and didn’t work as well.

Got an update (unfortunately its probably as maddening as the nvidia recommended fix for sshd not working… i.e. I re-flashed everything and now its magically working).

Aside from a complete reflash, I did go from a 16GB SD card to a 32GB. I cant imagine that fixed it, but I was running low on disk space in general (still had about 600mb free though). My betting side says something needed to compile that didn’t.

Oh no. I actually reflashed 3 times already with the latest image and also I was using 32gb to start with. May I know which image are you using? Might probably give it another go since I can’t do anything anyway.

Just the standard image from the downloads page (4.6)

May I know how you installed dlib? Were you following the tutorial like I did? Or you build dlib by itself?

I wish I had more insight for you. Unfortunately all I can really say is dlib doesn’t seg fault (any more) when I import it… I have no idea if it actually works because I have had so many frustrations with this platform that I have practically given up for the short term. I cant get the camera to work. I cant really get anything at all to work on this board without a ridiculous amount of “fixes”. Literally nothing I’ve touched on this works without multiple google searches and dead ends like this one.

I’m using pip3 install dlib and it looks like it compiles itself as part of the install (never really paid attention to that on the python side because it just works on every other platform… intel linux, intel macos, raspberry pi).

Again, I would be shocked and dismayed if it actually worked given the slew of other issues the jetson nano has. I’ve literally wasted a week and have nothing to show for it. I cant even point to a working example that would validate it would be suitable for my project.

Sorry, I’m venting. Good luck. If this gets resolved, I’d love to try it again, but for now I’ve hit the limit of my patience.

Also, looks like dlib in the tutorial is installed through the face_recognition package? Maybe try installing it directly? I’m pretty sure I did that on my first round when it segfaulted, so I wouldn’t wager on that being the solution.

Manual build and install of latest dlib version is strongly recommended. If I remeber correctly tjere was an issue. With dlib <=19.19 on Jetson platform.

Thanks a bunch man. Ya its really frustrating when it comes to the gpu support side. Well I guess I will just have to keep trying.

Actually the version I am using is 19.22, at least that’s what shown on the file name. I will try again just to install dlib and build it manually instead of using face_recognition and see where it gets me.

Hi, faustino

Have you installed the dlib successfully?

In general, we recommend upgrading the device into JetPack 4.6 first.
Do you also meet the same issue with JetPack 4.6?