Hi All,
I been trying to deploy an app using streamlit. but getting cv2 module not found.
pls can anyone help me to sort out this issue
Hi All,
I been trying to deploy an app using streamlit. but getting cv2 module not found.
pls can anyone help me to sort out this issue
That’s because there is not PyPI module with the name “cv2”, I would say. So for example, pip install cv2
will also fail in your local Python environment. How did you install the package in your local environment?
I guess what you want is opencv-python · PyPI, at least in their readme they use it with import cv2
. So you should add opencv-python
to your requirements.txt
.
I used pip install opencv-python command to install open cv package in local machine. And in requirement.txt file i have added opencv-python-headless==4.5.1.48 as a requirement. still getting the error.
pls let me know what changes i have to do.
Thanks
I would say one needs to take a look at the full log file then. Your log in the screenshot is cropped to the right and to the top, so it’s hard to say if opencv-python-headless==4.5.1.48 is installed correctly.
Hi @Arun_A.S,
Welcome to the Streamlit forum!
For future reference, please read through our guidelines on asking an effective question and share relevant links to your app and GitHub repo.
It looks like you’ve misspelled your dependency file as requirement.txt
. Once you rename the file in GitHub to requirements.txt
, all the required dependencies should get installed.
Best,
Snehan
Thanks @snehankekre. My bad, yes spell error created all the problem
Thanks @jgieseler . Issue sorted out
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.