[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

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

204 views · 0 likes · 2 posts


AJiaBoKe (@lijunyi2) · 2024-08-22

I need to install `opencv-python` in my python project, but I get the following error after deployment:
![image|690x210](upload://7McsiOI90yAi4SB64Ira8ouMmZE.png)

my `requirements .txt` :

```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


Pauline P. Narvas (@pawlean) · 2024-08-22

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
```