I am creating app from Github. code is Python. Worked fine until I added “from fpdf import FPDF” Now it gives error on that..
Welcome to the Streamlit community, and thanks for your question!
This is a common issue when deploying apps that use extra libraries like fpdf. The error occurs because fpdf isn’t included in your requirements.txt file, so Streamlit Community Cloud doesn’t know to install it. To fix this, add fpdf to your requirements.txt file in your GitHub repo, then reboot your app. For example, your requirements.txt should include:
streamlit
fpdf
After updating, commit and push the changes to GitHub, then reboot your app. For more details, see the official docs and FAQ on ModuleNotFoundError and requirements.txt usage.
Sources: