In runtime.txt add required version
python-3.9.5
like this
https://github.com/heroku/python-getting-started/blob/main/runtime.txt
supported vestions are
python-3.9.5
python-3.8.10
python-3.7.10
python-3.6.13
- You can set your python version in heroku by creating a file called runtime.txt (in the root folder)
- Add the following line in the file, replace the numbers with whatever version you want.
python-3.10.3