简体   繁体   中英

getting ImportError: dlopen(/usr/local/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2) when working with tensor flow

Getting following error when i run my object detection python script

**Traceback (most recent call last):
  File "object_detection_tutorial.py", line 25, in <module>
    import cv2
  File "/usr/local/lib/python3.6/site-packages/cv2/__init__.py", line 4, in <module>
    from .cv2 import *
ImportError: dlopen(/usr/local/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2): Symbol not found: _clock_gettime
  Referenced from: /usr/local/lib/python3.6/site-packages/cv2/.dylibs/libavutil.55.78.100.dylib (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib
 in /usr/local/lib/python3.6/site-packages/cv2/.dylibs/libavutil.55.78.100.dylib**

When I had a similar core error (ie the string (which was built for Mac OS X 10.12) also threw me for a loop), there was a bug in the specific build of the Python library I was importing.

Try importing an older build/version, but if that doesn't work a simple re-install of the python flavor you're using (via homebrew) might be a quick fix.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM