Environment info: Anaconda
, windows7x64
, py3.5
I setup a virtual env named as menpo
to run menpoproject
. For a long time I was using load_dlib_frontal_face_detector
smoothly. After tinkering with a pip-install dlib
command accidentally on virtualenv (I mean via Anaconda Prompt menpo
) , I couldn't get my code working due to an "ImportError" ImportError: cannot import name' load_dlib_frontal_face_detector'
. Code is like below:
import cv2
import menpo.io as mio
import menpodetect
Throws error at line 3. There is this guy seems to had a similar issue. https://github.com/menpo/menpodetect/issues/15
I did all the
conda remove dlib -y
pip uninstall dlib
conda install -c conda-forge dlib
stuff but still got the same error. Besides that;
Uninstalled Anaconda completely
Removed all Python folders wherever I found.
Installed Anaconda and setup a new menpo virtual env and still no luck. It seems like this dlib installation I made causing some issues. BTW, conda list
produces dlib 18.18 py35_2 menpo
and there is no pip
line as mentioned in the link given above.
Wrong alarm. Seems that I've named my py file as menpodetect which I shouldn't do. Problem solved.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.