Huy Vo Huy Vo - 1 month ago 117x
Git Question

Heroku/python failed to detect set buildpack

I'm a Django newbie, I created an app and want to deploy it using Heroku. However, when I do

git push heroku master
(I follow Heroku's getting started), this is what I got:

Counting objects: 36, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (33/33), done.
Writing objects: 100% (36/36), 19.22 KiB | 0 bytes/s, done.
Total 36 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: -----> Failed to detect set buildpack
remote: More info:
remote: ! Push failed
remote: Verifying deploy....
remote: ! Push rejected to dry-waters-63931.
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ''

My root directory:

├── assignment
├── household_management (django app)
├── templates
├── db.sqlite3

I will be very appreciated if you guys can help. I'm really depressed right now...


You need to add a requirements.txt file which contains all of the modules required to run your application.

You can do pip freeze > requirements.txt to freeze all of your modules into a file. I would only recommend doing this if you're using a virtualenv because otherwise it will add ALL of your modules.

Anyways, just determine exactly what modules your application requires and create a file called requirements.txt and put it in your application directory.

The syntax for a requirements file is as follows:

package name == version #
package name == version #
package name == version #

Note: It is optional to specify a certain version number.

Here is an example requirements file (taken from this tutorial):