gpt4 book ai didi

opencv - Python 导入错误 : undefined symbol: _Z33parallel_pthreads_set_threads_numi

转载 作者:太空宇宙 更新时间:2023-11-03 21:52:51 25 4
gpt4 key购买 nike

我正在尝试在 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

我该如何解决这个问题?

最佳答案

一种可能是您的文件 cv2.cpython-34m.so 可能会更改为 cv2.cpython-34m.py 以便导入。这只是一个建议。

关于opencv - Python 导入错误 : undefined symbol: _Z33parallel_pthreads_set_threads_numi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33493741/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com