jetkiwi
jetkiwi

Reputation: 35

Heroku "failed to compile" with heroku/python build pack, with no signs of pip running

I am developing a Python app using aiohttp and redis to run in Heroku. It is deployed to Heroku via GitHub. Although there is no problem running the app locally, it fails to build in Heroku with the following error.

-----> Using set buildpack heroku/python
-----> Python app detected
-----> Installing python-3.5.2
 !     Requested runtime (python-3.5.2
 !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
 !     Push rejected, failed to compile Python app

Since the build is aborted before pip even has a chance to run, I'm not quite sure what has gone wrong. runtime.txt is copied off from a separate Heroku app which builds fine, and I can't find any problems in my requirements.txt.

My requirements.txt is:

aiohttp==0.21.6
redis==2.10.5

My runtime.txt is:

python-3.5.2

Upvotes: 0

Views: 162

Answers (1)

Januszdotnl
Januszdotnl

Reputation: 36

Ok. So I had the same issue as you did. If you look closely you see:

Requested runtime (python-3.5.2

Notice the "(". Probably has something to do with the encoding of the file. In Ubuntu I used dos2unix (apt-get install dos2unix && dos2unix runtime.txt) which solved this issue. Alternatively you could probably adjust settings in your favorite text editor / IDE. Atleast you'll know where to look.

Upvotes: 2

Related Questions