-
Notifications
You must be signed in to change notification settings - Fork 925
Closed
Description
Expected behaviour
import cv2
should not throw if libsm6
, libxrender-dev
, and libxext6
are not installed when using opencv-python-headless
.
Actual behaviour
import cv2
throws.
Steps to reproduce
- Create the following
Dockerfile
:FROM python:3.7-slim-stretch # Print architecture dpkg --print-architecture # Install OpenCV's runtime dependencies RUN apt-get update RUN apt-get -y install libglib2.0-0 # Uncomment the unfollowing lines, to get it to work # RUN apt-get -y install libsm6 \ # libxrender-dev \ # libxext6 # Install OpenCV headless using pip RUN pip install opencv-python-headless==4.1.0.25 # Ensure that opencv and its dependencies # are correctly installed RUN python -c 'import cv2'
- Build the image, and
import cv2
will throw:docker build --rm -t opencv-headless-exp:latest .
- Uncomment installation of
libsm6
,libxrender-dev
, andlibxext6
andimport cv2
won't throw anymore.
- OS: Debian stretch slim
- Architecture: amd64
- opencv-python-headless version: 4.1.0.25
xkortex and marcoffee
Metadata
Metadata
Assignees
Labels
No labels