Whether or not installing the opencv-python dependency is supported?

I need to install opencv-python in my python project, but I get the following error after deployment:

my requirements .txt

blinker==1.8.2
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
Flask==3.0.3
Flask-Cors==4.0.1
idna==3.7
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
numpy==1.26.4
opencv-python==4.10.0.82
requests==2.32.3
tqdm==4.66.5
urllib3==2.2.2
Werkzeug==3.0.4

How do I make changes to run my project

Hi, @lijunyi2!

You may be getting this error because you’re missing system libraries that OpenCV depends on. I believe that Vercel’s serverless environment doesn’t include these libraries by default.

Could you try replacing the opencv-python package with opencv-python-headless? So in your requirements.txt file, replace opencv-python==4.10.0.82 with:

opencv-python-headless==4.10.0.82