我使用cv2.xfeatures2d的时候出现这个错误,然后下载了 opencv-contrib-python就解决了这个问题。 我用的命令是: pip install opencv-contrib-python