Error: Deploy Python Heroku - Runtime (python-3.4.0) is not available

Asked

Viewed 223 times

0

Personal, all right.

Someone can help me solve the following problem:

I’m making an application in Django and now I’m in the process of uploading to the server. I’ll send it to Heroku.

I performed the following commands:

Creating git repository:

$ git init

Add and "commit" to the initiated repository:

$ git add .

$ git commit -m "first commit"

Shortly after:

$ heroku create

$ git push -m master

And the following mistake happens:

Counting objects: 97, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (85/85), done.
Writing objects: 100% (97/97), 324.35 KiB | 0 bytes/s, done.
Total 97 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote:  !     Requested runtime (python-3.5.2) is not available for this stack (heroku-18).
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 polar-reaches-18114.
remote: 
To https://git.heroku.com/polar-reaches-18114.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/polar-reaches-18114.git'

So, I’m deploying following a video lesson and at the time the teacher was using python 3.4.0, but currently I’m using python 3.5.2, seeing this, includes in the file Runtime.txt: Pyhton-3.5.2. However as I understood from the message the python version is not being recognized, I also tried to carry out the same process by changing the description of the file Runtime.txt to python-3.4.0, but the same problem occurs.

1 answer

0


According to the documentation of Heroku they only support versions 3.7.1, 3.6.7 and 2.7.15 of Python. You are trying to use versions that are no longer available, so modify your project to use version 3.7.1 (recommended) or 3.6.7 that will work.

  • Thanks! I’m just finding installation tutorials for the Python 3.7.0 version. Can you let me know how I can install version 3.7.1?

  • I checked that there are tutorials for python version 3.6.6 that according to documentation of Heroku is the default version: "By default, Newly created Python apps use the python-3.6.6 Runtime.". I will try to install python version 3.6.6

Browser other questions tagged

You are not signed in. Login or sign up in order to post.