pi 3 – Raspberry pi 3b crushes when installing dlib

i’m trying to install dlib in raspberry pi 3b, however it crushes when it reaches 85%
i tried zram, and increased swap size, disabled lightdm and booted directly into console, my ram is now at 140 mb, is there any more solutions i can use?

I installed dependancies:

sudo apt-get install -y build-essential cmake git unzip pkg-config libjpeg-dev libpng-dev libavcodec-dev libavformat-dev libswscale-dev libgtk2.0-dev libcanberra-gtk* libgtk-3-dev libgstreamer1.0-dev gstreamer1.0-gtk3 libgstreamer-plugins-base1.0-dev gstreamer1.0-gl gstreamer1.0-libcamera libxvidcore-dev libx264-dev python3-dev python3-numpy python3-pip libtbbmalloc2 libtbb-dev libv4l-dev v4l-utils libopenblas-dev libatlas-base-dev libblas-dev liblapack-dev gfortran libhdf5-dev libprotobuf-dev libgoogle-glog-dev libgflags-dev protobuf-compiler

and then installed opencv and imutils:

pip install opencv-python
pip install imutils

and then:

git clone https://github.com/davisking/dlib.git
cd dlib
python3 setup.py build
python3 setup.py install

suggest me any more solutions i have to make.

Read more here: Source link