Why I select python3.10, but still having python3.8

Hi, I select python 3.10, as shown below:

but the installation is still Python 3.8:

Then, I can not successfully install torch lib.

Hey there, thanks for sharing your question and screenshots! :blush: 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:

Hi, Thanks. I find the reason: in my project. I have one file called environment.yml:

dependencies: python=3.8

When I delete the environment.yml, everything works.