OpenCV 3.4 compilation: import cv2 crashes in Python

asked 2018-04-12 07:59:58 -0600

daniel451 gravatar image

I compile OpenCV 3.4 and configuration, compilation, ... runs just fine.

However, when I try to run import cv2 in a Python file this results in:

******************************************************************
* FATAL ERROR:                                                   *
* This OpenCV build doesn't support current CPU/HW configuration *
*                                                                *
* Use OPENCV_DUMP_CONFIG=1 environment variable for details      *
******************************************************************

Required baseline features:
SSE - OK
SSE2 - OK
SSE3 - OK
SSSE3 - OK
SSE4.1 - OK
POPCNT - OK
SSE4.2 - OK
AVX - NOT AVAILABLE
OpenCV(3.4.1) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.

This happens if I compile OpenCV with -D ENABLE_AVX=ON, but the system should have AVX features. I am running a headless Ubuntu 16.04 with kernel 4.13 on a server that has an Intel Sandybridge CPU that supports SSE, SSE2, SSE3, SSSE3, SSE4, SSE4.1, SSE4.2, and AVX.

If I set the cmake configuration with -D ENABLE_AVX=OFF (which I do not prefer, since it should be considerably slower), I can not even compile OpenCV. Cmake complains about several errors during configuration.

What could be the possible reasons?

My desktop computer also uses an Intel Sandybridge CPU and the same configuration runs just fine there, although I am using Arch Linux there.

edit retag flag offensive close merge delete