skatcat743
skatcat743

Reputation: 41

heroku push error python 3-6

I have an issue publishing my python code to heroku keep in mind that this is my first project on heroku and first with anything to do with repositories

Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (18/18), 21.80 KiB | 0 bytes/s, done.
Total 18 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote:  !     The latest version of Python 3 is python-3.6.5 (you are using python-3.6, which is unsupported).
remote:  !     We recommend upgrading by specifying the latest version (python-3.6.5).
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.6
remote:  !     Requested runtime (python-3.6) is not available for this stack (heroku-16).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to project.
remote:
To https://git.heroku.com/project.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/project.git'

Upvotes: 4

Views: 1649

Answers (2)

Daitona Carter
Daitona Carter

Reputation: 19

Try this

pipenv lock
git add. 
git commit -am "make it better"
git push heroku master

If you want a different version, edit the new file and enter the information in: [requires] python_version = "2.7" or [requires] python_full_version = "2.7.15"

Upvotes: 1

Ramandeep Singh
Ramandeep Singh

Reputation: 558

your requirements.txt file must contain python-3.6.5 everything in small letters and - sign is important

Upvotes: 0

Related Questions