Python 2.7 在MS Windows上找不到image_窗口Dlib Python包

Python 2.7 在MS Windows上找不到image_窗口Dlib Python包,python-2.7,object-recognition,dlib,Python 2.7,Object Recognition,Dlib,我目前正在处理对象识别问题,并决定使用Dlib,但是python包在MS Windows机器上找不到image_window()函数 示例代码: import dlib from skimage import io detector = dlib.get_frontal_face_detector() img = io.imread('obama.jpg') faces = detector(img) for d in faces: print "left,top,right,bot

我目前正在处理对象识别问题,并决定使用Dlib,但是python包在MS Windows机器上找不到image_window()函数

示例代码:

import dlib
from skimage import io

detector = dlib.get_frontal_face_detector()
img = io.imread('obama.jpg')
faces = detector(img)

for d in faces:
    print "left,top,right,bottom:", d.left(), d.top(), d.right(), d.bottom()

win = dlib.image_window()
win.set_image(img)
win.add_overlay(faces)
我得到以下错误:

“模块”对象没有“图像窗口”属性


上提出了一个答案,但由于我通过conda下载了该软件包,因此无法重新编译。

这可能是因为dlib的一个cmake脚本中存在一个错误,导致某些东西无法构建,除非cmake运行两次。然而,这个问题已经得到解决。因此,如果您从dlib的github存储库中提取最新代码,那么现在应该可以正常工作了。

我使用“conda安装-c conda forge dlib=19.0” 在windows10 64 py3.5中。代码可以工作,但pycharm无法自动完成dlib.image\u窗口()