Ask Your Question
0

import cv2 throws Symbol not found: _clock_gettime

asked 2018-01-09 21:09:29 -0600

Puneeth gravatar image

I have python 3.6 installed in my virtual env. I can import cv2 in my home directory. But when I change to any other directory it fails with following error: Please Help

import cv2

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/name/anaconda/envs/env-name/lib/python3.6/site-packages/cv2/__init__.py", line 4, in <module> from .cv2 import * ImportError: dlopen(/Users/name/anaconda/envs/env-name/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2): Symbol not found: _clock_gettime Referenced from: /Users/name/anaconda/envs/env-name/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 /Users/name/anaconda/envs/env-name/lib/python3.6/site-packages/cv2/.dylibs/libavutil.55.78.100.dylib

edit retag flag offensive close merge delete

Comments

I have the same problem how did you salf it???

feifeng gravatar imagefeifeng ( 2018-02-20 01:28:04 -0600 )edit

@feifeng please don't post answers here, if you have a question or comment, thank you.

berak gravatar imageberak ( 2018-02-20 02:17:12 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-01-10 16:45:18 -0600

I have the same problem on macOS X El Capitan 10.11.6.

I think this is an issue with python-opencv and mac operating system. From what I gather apple changed something to do with _clock_gettime function, meaning the maintainers of python-opencv will need to update.

edit flag offensive delete link more

Comments

Thanks for the reply.

Is there any simple work around to this problem other than

  1. Wait till python-opencv update themself to changed _clock_gettime function
  2. Or we update our Mac OS (assuming this problem wont come with higher Mac OS versions)
Puneeth gravatar imagePuneeth ( 2018-01-10 19:51:53 -0600 )edit

I am going to try upgrading my Mac from El Capitan to High Sierra this evening. I will let you know if it fixes the issue.

TheRealMarkWilliams gravatar imageTheRealMarkWilliams ( 2018-01-11 04:55:56 -0600 )edit

Upgrading to High Sierra fixed the problem for me

TheRealMarkWilliams gravatar imageTheRealMarkWilliams ( 2018-01-13 06:50:07 -0600 )edit

Thanks Man. You be the best. I will also try the same. Thanks

Puneeth gravatar imagePuneeth ( 2018-01-14 22:31:27 -0600 )edit

Hi, I faced the same error and i also updated the High Sierra Os after that i run it again showing,Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named cv2..what can i do kindly help me..Thanks in Advance

jega gravatar imagejega ( 2018-04-24 01:54:43 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-01-09 21:04:48 -0600

Seen: 5,564 times

Last updated: Jan 09 '18