Python app heroku deployment error

I am trying to deploy an app on heroku using python and GitHub but stuck with an error during the process of deployment. Please help! Here is the error:

-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Python app detected
-----> No Python version was specified. Using the buildpack default: python-3.10.3
To use a different version, see: Specifying a Python Runtime | Heroku Dev Center
-----> Installing python-3.10.3
-----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting pandas==1.2.4
Downloading pandas-1.2.4.tar.gz (5.5 MB)
Installing build dependencies: started
Installing build dependencies: finished with status ‘done’
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status ‘done’
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status ‘done’
Collecting numpy==1.20.2
Downloading numpy-1.20.2.zip (7.8 MB)
Installing build dependencies: started
Installing build dependencies: finished with status ‘done’
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status ‘done’
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status ‘done’
ERROR: Could not find a version that satisfies the requirement scipy==1.6.3 (from versions: 0.8.0, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 1.0.0b1, 1.0.0rc1, 1.0.0rc2, 1.0.0, 1.0.1, 1.1.0rc1, 1.1.0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0rc1, 1.4.0rc2, 1.4.0, 1.4.1, 1.5.0rc1, 1.5.0rc2, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6.0rc1, 1.6.0rc2, 1.6.0, 1.6.1, 1.7.2, 1.7.3, 1.8.0rc1, 1.8.0rc2, 1.8.0rc3, 1.8.0rc4, 1.8.0)
ERROR: No matching distribution found for scipy==1.6.3
! Push rejected, failed to compile Python app.
! Push failed

Hi there and welcome to the forums!

When pushing to Heroku it looks for a requirements.txt in order to install the correct packages to run your site on their servers. In this requirements.txt should be a list of all the packages needed along with the version that is needed for it to work. From the looks of the error, your requirements.txt specifies that you need version 1.6.3 of scipy, however Heroku is unable to find this version.

You can see there a list of versions it can find, if you choose one of them (either the newest 1.8.0 or the closest to your version 1.7.2) and replace the version in the text file with that version it should hopefully be able to continue with the upload.