OpenCV: AttributeError: module 'cv2' has no attribute 'face'

后端 未结 7 1862
刺人心
刺人心 2020-12-21 12:14

I am creating a face recognition system using Python and OpenCV on these versions:

  • Python 3.6.2 :: Anaconda custom (64-bit)
  • Anaconda 4.3.23
  • O
7条回答
  •  旧时难觅i
    2020-12-21 12:26

    The Menpo project does not have an installer for OpenCV 3.3. The Menpo project is up to 3.1 on macOS and Windows, and 3.2 on Linux. See the Anaconda package for that description and also the list of files for the installer versions. Actually, you can check out the GitHub repo for Menpo's OpenCV3 build and grab the files yourself. You can change the build files to suit your system if needed.

    I'm not sure if your pip attempt includes a typo or not---the correct PyPI package wheel file with the contrib module is opencv_contrib_python not opencv_python+contrib, as shown at PyPI. Note that if you're not using Windows the GUI features of OpenCV will not work with the pip installer, including imshow() and other similar features.

    You'd be better served just removing and reinstalling fresh with the contrib modules instead of trying to build them in later.

提交回复
热议问题