opencv-contrib-python安装后没法使用的解决方案

当我在使用SIFT的时候须要用到opencv-contrib-python,因此我就在anaconda上pip install opencv-contrib-python,可是安装后,我运行代码的时候,仍是提示这个包有问题,错误提示以下所示:python

(-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SIFT::create'.........ui

 

 为何会出如今这种状况能,通过我查阅资料后,发现这种状况就是由于版本的问题,只要把opencv-contrib-python的版本改为3.3就能够了,具体方法就是在pycharm中pip install --user opencv-contrib-python==3.3.0.10就能够解决这个问题了,this