下載this指導一步一步。除了使用python 3.4.3和pyvenv而不是virtualenv。我已經安裝:在heroku上部署Django項目(python 3.4.3)
- 的Python 3.4.3
- 的Django 1.8.2
- 中的python-psycopg2
- 的libpq-dev的
我的步驟是:
- 的mkdir hellodjango & & cd hellodjango
- pyvenv VENV
- 源VENV/bin中/激活
- PIP安裝Django-工具區(成功)
- django-admin.py startproject命令hellodjango。
- 創建Procfile(網址:gunicorn hellodjango.wsgi --log文件 - )
- 工頭開始(成功併爲您在瀏覽器工作程序)
- PIP凍結> requirements.txt
- 添加runtime.txt (蟒-3.4.3)
- 填充settings.py和wsgi.py作爲指南說
- Init和提交git倉庫
- Heroku的創建(成功)
- 混帳推Heroku的主
所以混帳推Heroku的主說(錯誤!):
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'
正如你所看到的主要錯誤是Requested runtime (remote: python-3.4.3) is not available for this stack (cedar-14).
什麼時我做錯了?
變化**的python-3.4.2 ** – madzohan