【发布时间】:2016-02-03 06:54:47
【问题描述】:
我正在尝试在 CentOS6 上编译和安装 OpenCV3(以 Python3.4 为目标)。 当我 cmake 时,我设置了以下选项。
BUILD_opencv_python3=ON
BUILD_opencv_videoio=OFF(turned this off because I am not using the video modules and this throws some errors while compiling)
PYTHON3_EXECUTABLE=/usr/local/python/bin/python3.4
PYTHON3_INCLUDE_DIR=/usr/local/python/include/python3.4m
PYTHON3_LIBRARY=/usr/local/python/lib/python3.4
PYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/python/lib/python3.4/site-packages/numpy/core/include
PYTHON3_PACKAGES_PATH=/usr/local/python/lib/python3.4/site-packages
通过上述配置,编译正常,但是当我尝试导入输出文件(cv2.cpython-34m.so)时,出现以下错误。
Python 3.4.3 (default, Nov 2 2015, 17:44:31)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2(←renamed from cv2.cpython-34m.so to this)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /home/dai/opencv-3.0.0/build/lib/libopencv_core.so.3.0: undefined symbol: _Z33parallel_pthreads_set_threads_numi
我该如何解决这个问题?
【问题讨论】:
标签: opencv python-3.x image-processing python-3.4 opencv3.0