1
votes

Iam having the below error while importing opencv in a face recognition project

import cv2 File "/Users/vijaykumar/Desktop/face_recogproj/venv/lib/python3.6/site-packages/cv2/init.py", line 3, in from .cv2 import * ImportError: dlopen(/Users/vijaykumar/Desktop/face_recogproj/venv/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2): Symbol not found: _inflateValidate Referenced from: /Users/vijaykumar/Desktop/face_recogproj/venv/lib/python3.6/site-packages/cv2/.dylibs/libpng16.16.dylib (which was built for Mac OS X 10.13) Expected in: /usr/lib/libz.1.dylib in /Users/vijaykumar/Desktop/face_recogproj/venv/lib/python3.6/site-packages/cv2/.dylibs/libpng16.16.dylib

1

1 Answers

0
votes

Installing OpenCV on macOS has many steps.

I hope you have done this brew install jpeg libpng libtiff openexr

You can follow this link for the complete guide to install OpenCV 4 on macOS:

For OpenCV 3