How to set the Python version in Hugging Face Space?

Thank you. I tried modifying the README.md file, but the Python version did not change and remains 3.10:

---
title: XXX
emoji: 🦀
colorFrom: yellow
colorTo: red
sdk: gradio
sdk_version: 4.36.1
app_file: app.py
pinned: false
license: apache-2.0
python_version: "3.8.19"
---
2024-06-12
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

What should I do? I can’t pinpoint the issue right now. Perhaps I need to test with Python 3.10 locally to identify the exact cause.

1 Like