Dlib 19.10 Python Interface problem
Hello,
I've installed the python interface for the Dlib-19.10 with python setup.py install command and it has been already added to the Python environment.

But when I try to access the functions or classes (APIs), it behaves like an empty class. I mean it appears nothing when I type the Dlib with a dot(.) dlib. , or it does not execute something.
and this is the error in the console:
Python 3.6.5 - Windows 10
import dlib
ImportError: DLL load failed: The specified module could not be found.
Try uninstall dlib and then install stable version the same way, for example dlib 19.4. If that doesnot work then problem in some of your installation steps.
Do not install an old version like 19.4.
What does "behaves like an empty class" mean? You then go on to say that you get an error when you run import dlib. So you can't even import it? How do you then get into a position to write dlib. anything in the first part of your question?
You need to read the issue template and clearly describe your problem and the steps to reproduce it.
Actually I read the template but I could not fit this problem in it. That's the reason I wrote like that.
Just try to install the Python interface for the Dlib-19.10 on a Windows 10 machine and a Python 3.6.5 environment.
I can not import the Dlib, although it has installed. and I get the above mentioned error.
I've done this, and it's also part of the unit tests and it all works fine. Lots of other people also use dlib in this configuration.
If you can't figure out how to replicate the problem you aren't going to get help.
I had this issue while using MKL lib. If you don't set the MKL environment variables after you install you probably get dll error. Here you should do: https://software.intel.com/en-us/mkl-windows-developer-guide-setting-environment-variables
Just call mklvars intel64 mod ilp64 in "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl\bin"
then try python in same shell and import dlib. If it is OK make the variables as system global variables. Variables are PATH, LIB, and INCLUDE.
@davisking Maybe it can be added to somewhere on the installation notes.
CMake is setup to link to the Intel MKL correctly without the user doing anything. If that isn't what is happening then please post your own issue that describes exactly how to replicate the problem.
I have the same problem with the latest v19.17.0 too. Like what @deeptechs commented, every single time before I use dlib, I have to call
"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl\bin\mklvars.bat" intel64
; otherwise, the error below will occur.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
For the older pre-built .whl v19.8.1, everything is working fine.
@davisking Do you have any suggestion? On Windows, MKL does not permanently set environment variables. Could please have a look here https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/545280 ?
Try using the latest dlib on github. I just pushed a change that makes the installer automatically pull in the Intel MKL dll files so you don't have to deal with this anymore.
When I install the dlib v19.6.1 then solve the problem, my previous version is 19.6.0.