h4kl0rd
h4kl0rd

Reputation: 625

heroku push rejected, failed to compile Python app

I have created a python application using "Flask" a python framework. I used the following documentation https://devcenter.heroku.com/articles/python

When I run this:

git push heroku master

I'm getting the following error after pushing to heroku.

Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (8/8), 1.62 KiB, done.
Total 8 (delta 0), reused 0 (delta 0)

-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.4.
-----> Preparing Python runtime (python-2.7.4)
-----> Installing Distribute (0.6.36)
-----> Installing Pip (1.3.1)
-----> Installing dependencies using Pip (1.3.1)
       Downloading/unpacking BeautifulSoup==3.2.1 (from -r requirements.txt (line 1))
         Downloading BeautifulSoup-3.2.1.tar.gz
         Running setup.py egg_info for package BeautifulSoup

       Downloading/unpacking CDApplet==1.0 (from -r requirements.txt (line 2))
         Could not find any downloads that satisfy the requirement CDApplet==1.0 (from -r requirements.txt (line 2))
       No distributions at all found for CDApplet==1.0 (from -r requirements.txt (line 2))
       Storing complete log in /app/.pip/pip.log

 !     Push rejected, failed to compile Python app

To [email protected]:frozen-brushlands-5131.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:frozen-brushlands-5131.git'

Any help is appreciated.

Upvotes: 1

Views: 6984

Answers (4)

Adebayo Omolumo
Adebayo Omolumo

Reputation: 88

I also ran into this problem, luckily, I found a fix. This are the steps I took.

Step 1 You need to upgrade the heroku app via command line interface

`$` heroku stack:set heroku-18 -a <app name>

Note that this will not affect previous apps that was built so you may need to rebuild the app. Remember to substitute "app name" with the name of the app

`$` git commit --allow-empty -m "Upgrading to heroku-18"

After the previous line, try pushing it again with:

`$` git push heroku master

Step 2 If this doesn't work remove the runtime.txt file containing the python version and remember to add and commit changes to git. Push once again and it should work, It worked for me! My CLI

Upvotes: 0

savepopulation
savepopulation

Reputation: 11921

i have same problem and fixed with

git add *
git commit -m "initial commit"
git push heroku master

i hope this'll help you.

Upvotes: 0

anurag619
anurag619

Reputation: 712

I encountered the same error, try removing the concerned dependency (or add a correct name). After that, do: git add .

git commit -m "commit-message"
git push heroku master

You should be ready to go now.

Upvotes: 1

JoshFinnie
JoshFinnie

Reputation: 4911

Looks like there is not a Python package called CDApplet. When your Heroku app tries to install CDApplet it fails and gives you this error.

I tried it locally and could not find a Python package called CDApplet either.

Upvotes: 1

Related Questions