# \[Solved\] Import cv2- no module exists error while deploying

**URL:** <https://discuss.streamlit.io/t/solved-import-cv2-no-module-exists-error-while-deploying/6799>\
**Category:** Community Cloud\
**Tags:** opencv, streamlit-cloud\
**Created:** [October 31, 2020, 4:30pm UTC](https://discuss.streamlit.io/t/solved-import-cv2-no-module-exists-error-while-deploying/6799 "2020-10-31T16:30:08Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sree369nidhi](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/sree369nidhi/32/3589_2.png) [@sree369nidhi](https://discuss.streamlit.io/u/sree369nidhi)\
**Post date:** [October 31, 2020, 7:54pm UTC](https://discuss.streamlit.io/t/solved-import-cv2-no-module-exists-error-while-deploying/6799/4 "2020-10-31T19:54:54Z")

</div>

I hosted on streamlit sharing,  
so change the requirements.txt as follows

numpy  
opencv-python-headless

This successfully worked for me, Hope this helps @aniketwattamwar.

 ![SharedScreenshot](https://global.discourse-cdn.com/streamlit/original/2X/7/7b05092097129714fbbd38d0a72fec3817e4c2e3.jpeg)

By the way while running the code I encountered few errors:

1. In Image Processing  
Contours  
ValueError: not enough values to unpack (expected 3, got 2)

2. In Feature Detection in images  
SIFT  
AttributeError: module ‘cv2.cv2’ has no attribute ‘xfeatures2d’

After fixing the error and successfully deploying, please edit the title and add [Solved] at the beginning, it will be helpful for similar error encounters.

---

_[View the full topic](https://discuss.streamlit.io/t/solved-import-cv2-no-module-exists-error-while-deploying/6799)._
