Heroku - Error with requirements.txt

Hi everybody,

I’m using in my app a code for searching news that I got from this link: GitHub - areed1192/finance-news-aggregator: A news aggregator in python, that focuses primarily on business and market news sources.

I used: pip install fin-news and it was installed and works perfect in mi local machine.

To deploy my app in Heroku I added to the requirements.txt file:

And when I try to push to Heroku the following error message appears:
ERROR: Could not find a version that satisfies the requirement fin-news==0.1.1

I can’t understand why I can download fin-news without any problem in my computer but not in Heroku?

Thanks in advance for your help.

Looks like fin-news requires Python 3.8 or later, so my guess is you have a recent version of Python installed locally but an older version on Heroku.

I think you just need to add a file runtime.txt to your repo and bump the version of Python to something newer. See here

1 Like

Hi @tcbegley

Thanks for your help.

I’m trying to implement that for 4 hours but without any success. :woozy_face:

although in the heroku page said that supports different python versions, each time I add a version in runtime.txt I get the message:

remote:  !     Requested runtime (Python 3.8.7) is not available for this stack (heroku-18).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.

Also I did the recomendation to check buildpack but nothing happends.

There is to many (unknown for me) things in Heroku (dynos, stacks, postgres, dataclips, add-on, etc. etc.), if this is the easy way to deploy an app I don’t want to see how it feels to use the worst. :joy: :joy:

Hi @tcbegley

I solved the issue, my error was writing the runtime.txt file.

Correct input is:


I was using:

Python 3.8.7 as how its shown when I ask for the version. :woozy_face:

Thanks again for your help. :grinning: :grinning:

1 Like


Now the fin-news==0.1.1 was upload but now the error in Heroku is:

from finnews.client import News
app[web.1]: ModuleNotFoundError: No module named 'finnews'

I don’t understand because it works fine in my laptop :woozy_face:

Hi Eduardo

I’ve just installed the package and imported it fine in Ubuntu on my linux machine in Python 3.8.7.

So I see no reason why Heroku is unhappy with it??


1 Like