I can't see all the error log but in my case I have an error raised because the distutils
module has been deprecated in Python 3.10 therefore pip cant buid wheels.
To workarround you can avoid building dlib from source and install a precompiled wheel, or use Anaconda and execute install -c conda-forge dlib