Hey there, thanks for sharing your question and screenshots!
This is a common issue when deploying on Streamlit Community Cloud. Even if you select Python 3.10 in the app settings, your app may still use a different Python version if it was originally deployed with another version. Changing the Python version in the settings after deployment does not update the environment for existing appsâyou must delete and redeploy the app to apply the new Python version. This is confirmed in the official docs and community forum discussions: you need to delete your app and redeploy it, selecting Python 3.10 during the deployment process, not just in the settings after the fact. Also, make sure your requirements.txt includes torch (and any other dependencies) for successful installation during deployment.
For more details, see the official guidance on upgrading your appâs Python version and related forum posts about Python version selection and PyTorch install issues. If youâre still having trouble, please share your requirements.txt and repo link so the community can help debug further. And if you havenât already, check out the FAQ: ModuleNotFoundError for more tips. Community members, feel free to jump in with your experiences or solutions!
Sources: