Heroku/python failed to detect set buildpack

后端 未结 3 684
隐瞒了意图╮
隐瞒了意图╮ 2021-01-01 21:10

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

3条回答
  •  失恋的感觉
    2021-01-01 21:45

    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):

    Flask==0.11
    Jinja2==2.8
    gunicorn==19.6.0
    

    Don't forget to commit your requirements.txt

提交回复
热议问题