Recently, I faced the same problem. First, make sure cmake was installed, then use this code:
pip install --no-build-isolation dlib