Error installing requirements from requirements.txt

I always get the error message about the erquirements

Collecting streamlit>=0.1
  Downloading streamlit-1.28.1-py2.py3-none-any.whl (8.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.4/8.4 MB 89.8 MB/s eta 0:00:00[2023-11-09 10:58:17.467451] 
Collecting opencv-python>=4.5.0
  Downloading opencv_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (61.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.7/61.7 MB 239.1 MB/s eta 0:00:00[2023-11-09 10:58:18.147509] 
Collecting numpy
  Downloading numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.2/18.2 MB 162.7 MB/s eta 0:00:00
Collecting Pillow>=7.2.0
  Downloading Pillow-10.1.0-cp39-cp39-manylinux_2_28_x86_64.whl (3.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 141.6 MB/s eta 0:00:00[2023-11-09 10:58:19.409656] 
ERROR: Could not find a version that satisfies the requirement libgl1-mesa-glx (from versions: none)
ERROR: No matching distribution found for libgl1-mesa-glx
WARNING: You are using pip version 22.0.3; however, version 23.3.1 is available.
You should consider upgrading via the '/home/appuser/venv/bin/python -m pip install --upgrade pip' command.
Checking if Streamlit is installed

────────────────────────────────────────────────────────────────────────────────────────

[10:58:19] ❗️ installer returned a non-zero exit code
[10:58:19] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[10:59:57] ❗️ Streamlit server consistently failed status checks
[10:59:57] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

Please share a link to your public github repo.

It is:

Try a reboot of the streamlit app.

Hi @Sophia

From the following error, it seems that you’re missing a dependency from the OS

You can add this package in the packages.txt file.

Afaik none of the above mentioned python libraries require any additional OS package.
The error message from post#1 may result from a prior version of the requirements file.

the requirements are correct. But I can’t access the webcam that is in my code on the streamlit cloud. What do I need to change cause it works perfectly fine on the local environement

  • Which python file are you referring to?
  • You cannot use cv2.VideoCapture() on streamlit cloud

I’m referring to the age_gender.py file

and yes, I can’t use the cv2.VideoCapture(0)

  • You have to go for another approach for example with streamlit-webrtc or a similar streamlit component.
  • Btw, webbrowser will also not work on streamlit cloud.
1 Like

I have now changed the webcam to streamlit-webrtc and it works perfectly fine on my local network but as soon as I start it on the streamlit cloud it opens a video frame and after pressing the start button it loads forever, then showing a black screen and closes again. But I don’t get any Error message.

and I’ve added a test.py file to try out the webcam but it’s the same problem. It works on the local network but not on the streamlit cloud

Hi @Sophia

Have you tested this on a different computer or from a different internet provider or even check if proxy is preventing this.

Also there’s a related post to this here:

Hope this helps!