On a Debian/Ubuntu-based environment using OpenSSL 3.0.x, importing OpenCV (import cv2) aborts the Python process with an OpenSSL FIPS self-test failure:
crypto/fips/fips.c:154: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
Aborted (core dumped)
This is a hard abort (exit code 134), not a Python exception.
Using an older OpenCV version works as expected in the same environment.
Steps to reproduce (I am on Databricks but I assume other environments will have similar issues)
-
Create a clean environment (e.g., Databricks / Debian-based container / Ubuntu).
-
Install OpenCV (newest version):
pip install opencv-python
- Run:
python -c "import cv2; print(cv2.version)"
Actual result
crypto/fips/fips.c:154: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
Aborted (core dumped)
Expected result
import cv2 should succeed and print the OpenCV version.
Environment:
OS: Debian/Ubuntu-based (e.g. Databricks runtime / Linux x86_64)
Python: 3.12