The error message is: ModuleNotFoundError: No module named ‘pyvips’
The module ‘pyvips’ must be installed as: pip install “pyvips[binary]”
python --version
Python 3.13.11
streamlit --version
Streamlit, version 1.58.0
https://github.com/Katsshared/chess-editor
requirements.txt:
pyvips[binary]
streamlit
streamlit_image_coordinates
PIL
chess
os
gettext
If you’re creating a debugging post, please include the following info:
- Share the link to the public app (deployed on Community Cloud).
- Share the link to your app’s public GitHub repository (including a requirements file).
- Share the full text of the error message (not a screenshot).
- Share the Streamlit and Python versions.
Hey there, thanks for sharing all the details and welcome to the Streamlit community!
The error ModuleNotFoundError: No module named ‘pyvips’ means the pyvips package isn’t being installed in your app’s environment on Streamlit Community Cloud, even though you’ve listed pyvips[binary] in requirements.txt.
My understanding is that Streamlit Community Cloud supports installing public PyPI packages, but some packages with binary dependencies (like pyvips[binary]) may fail if they require system-level libraries not present on the platform. Also, the [binary] extra for pyvips may not be recognized by pip in all environments, or the underlying system dependencies for pyvips might be missing, causing the install to silently fail or be skipped. According to the docs, you should only list actual PyPI package names in requirements.txt, and extras (like [binary]) can sometimes cause issues on Linux-based cloud platforms if the required binaries aren’t available or installable via apt-get. See more at App dependencies for your Community Cloud app and ModuleNotFoundError No module named - Streamlit Docs.
Here’s what you can try:
- Remove the [binary] extra and just use pyvips in requirements.txt.
- If pyvips still fails, it likely needs system-level dependencies not available on Community Cloud. In that case, you may need to deploy on a platform where you can install system packages, or use a different image processing library that works out-of-the-box.
- Double-check your requirements.txt for typos and make sure it’s in the root of your repo.
- After making changes, commit, push, and reboot your app.
If you want to debug further, check the app logs via “Manage app” for any pip install errors related to pyvips. For more troubleshooting tips, see the FAQ: ModuleNotFoundError and App dependencies. Community members, feel free to jump in if you’ve gotten pyvips working on Community Cloud!
Sources:
It does not matter whether requirements.txt has pyvips[binary] or pyvips. The module pyvips allows to work with svg graphics, because streamlit can not. The module pyvips must be installed by command: pip install “pyvips[binary]”. This is the only solution, otherwise it won’t work, because of binaries.
How one could force the streamlit cloud to carry out the command: pip install “pyvips[binary]” ???
Additionally, the application works fine on both linux and windows platforms locally. Because of streamlit can not work with svg graphics it should have e.g method to convert svg to png graphics. Otherwise one is forced to use such modules as cairosvg or pyvips.
Would it be possible to extend streamlit to convert svg to png graphics?
Another option would be to extend streamlit_image_coordinates to work with svg pictures also.
Would it be possible to extend streamlit_image_coordinates to work with svg images?
There is another error message in module streamlit_image_coordinates
File “/mount/src/chess-editor/StreamlitChessEditor.py”, line 5, in
from streamlit_image_coordinates import streamlit_image_coordinates
File “/home/adminuser/venv/lib/python3.13/site-packages/streamlit_image_coordinates/init.py”, line 12, in from streamlit.elements.image import UseColumnWith
ImportError: cannot import name 'UseColumnWith' from 'streamlit.elements.image'
(/home/adminuser/venv/lib/python3.13/site-packages/streamlit/elements/image.py)
please inform Zachary Blackwood - the author of module streamlit_image_coordinates
Setting the versions of modules in requirements.txt like
pyvips==3.1.1
pyvips-binary==8.18.4
streamlit==1.58.0
streamlit-image-coordinates==0.4.0
solved the problems.
Great thanks for assistance and please delete the post!!!