'dlib is installed but unable to import (vs code)

I have installed dlib library successfully for python 3.10.4 on my computer using the traditional pip command. But after installing now I am trying to import the same and it is throwing error. Please help me out on the same.enter image description here

installation confirmation for dlib



Solution 1:[1]

The solution for my problem was....

  1. install cmake (pip install cmake)
  2. install wheel (pip install wheel)
  3. install dlib (pip install dlib)
  4. set the interpreter to correct version of python (in my case vs code was using python 3.9 and I have installed dlib on 3.10.... then I changed the interpreter to 3.10 and then it worked for me)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1