-2

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

  • 1
    Please note, that Stack Overflow discourages using **images** which represent **text**. Instead paste the code and the error messages directly into the question post, see [ask]. BTW, on the first image you have imported statement only **highlighted** by IDE (VSCode in your case). Have you actually tried to **run** your code? IDE highlighting doesn't mean the code cannot be run. – Tsyvarev Apr 10 '22 at 21:17

2 Answers2

-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)
-1

In my case, the problem has been solved by setting properly the PATH for the Python Interpreter. If you want to check or give it a try to this, check bellow how you can do that.

If you run VSCode on Windows go to:

  • File
  • Preferences
  • Settings
  • User (tab on the top left)
  • Extensions (side column)
  • Python
  • Default Interpreter Path (section, on the right side)

Insert your Python Interpreter Path. In my case it is "C:\Users\userName\AppData\Local\Programs\Python\Python310", check yours. Hope that helps.

Victor
  • 1
  • 4