-
Notifications
You must be signed in to change notification settings - Fork 520
Description
camelot depends on opencv-python-headless package, which pip allows to be installed side by side with regular opencv-python. But this actually leads to conflicts, as interpreter can import headless version of cv2 instead of the regular one afterwards.
Steps to reproduce the bug
- Create a venv and activate it
pip install opencv-pythonpip install camelot-py[base]
Code
import numpy
import cv2
cv2.imshow('Black square', numpy.zeros((256, 256, 3), numpy.uint8))
cv2.waitKeyEx()Expected behavior
Program shows a window with black square in it.
Actual behavior
Program fails, because installed headless dependency overrides regular opencv, but doesn't provide imshow() function.
Suggestion
Is it possible to create an extra of camelot package that depends on regular version of opencv-python instead of headless version? This would allow camelot to co-exist with opencv-python in the same environment.
If you install packages in the opposite order, or if you uninstall opencv-python-headless and then force reinstall opencv-python, camelot functions just fine (I tested with lattice method), so it could use regular opencv-python instead.
Environment
- OS: Windows 10
- Python version: 3.13
- Numpy version: 2.2.6
- OpenCV version: 4.12.0
- camelot version: 1.0.9