1
votes

Im folowing this guide step by step. Except im using python 3.4.3 and pyvenv instead of virtualenv. I have installed:

  • Python 3.4.3
  • Django 1.8.2
  • python-psycopg2
  • libpq-dev

My steps are:

  1. mkdir hellodjango && cd hellodjango
  2. pyvenv venv
  3. source venv/bin/activate
  4. pip install django-toolbelt (success)
  5. django-admin.py startproject hellodjango .
  6. created Procfile (web: gunicorn hellodjango.wsgi --log-file -)
  7. foreman start (success and check working app in browser)
  8. pip freeze > requirements.txt
  9. add runtime.txt (python-3.4.3)
  10. filled settings.py and wsgi.py as guide says
  11. Init and commit git repo
  12. heroku create (success)
  13. git push heroku master (error!)

So git push heroku master says that:

Counting objects: 14, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (14/14), 2.90 KiB | 0 bytes/s, done.
Total 14 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing runtime ( 
remote: python-3.4.3)
remote:  !     Requested runtime ( 
remote: python-3.4.3) is not available for this stack (cedar-14).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote: 
remote:  !     Push rejected, failed to compile Python app
remote: 
remote: Verifying deploy...
remote: 
remote: !       Push rejected to cryptic-thicket-7510.
remote: 
To https://git.heroku.com/cryptic-thicket-7510.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/cryptic-thicket-7510.git'

As you can see main error is Requested runtime (remote: python-3.4.3) is not available for this stack (cedar-14). What am i doing wrong?

1
change in runtime.txt to python-3.4.2 - madzohan

1 Answers

0
votes

According this heroku does support python 3.4.3. You just need to use appropriate pip version. So [pip3 install django-toolbelt] instead of [pip install django-toolbelt]