The dlib Module requires gcc version higher than 4.8. Default CentOS 7 comes with 4.8 as latest version.
Using Developer Tool Set you can install higher version of gcc in another folder (Say /opt) and your compilation will be higher version.
Please check the command below.
# yum install centos-release-scl -y # yum install devtoolset-7-gcc* -y # enable devtoolset-7 bash # which gcc # gcc --version # pip install wheel # pip install dlib
This will install dlib in CentOS 7