我正在尝试使用Heroku文档中的以下命令将Heroku上的几个Django应用程序升级到Cedar-14:
➜ project-name git:(master) ✗ heroku stack:set cedar-14
Stack set. Next release on project-name will use cedar-14.
Run `git push heroku master` to create a new release on cedar-14.
➜ project-name git:(master) ✗ git commit --allow-empty -m "Upgrading to Cedar-14"
[master 3710f78] Upgrading to Cedar-14
➜ project-name git:(master) ✗ git push heroku master
Counting objects: 1, done.
Writing objects: 100% (1/1), 191 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing runtime (python-2.6.9)
remote: -----> Installing dependencies with pip
remote: /app/tmp/buildpacks/python/bin/steps/pip-install: line 7: /app/.heroku/python/bin/pip: No such file or directory
remote:
remote: ! Push rejected, failed to compile Python app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to project-name.
remote:
To https://git.heroku.com/project-name.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/project-name.git'
看来失败与pip有关。我想知道我是否缺少某种要求?这是我的requirements.txt的内容:
Django==1.4.3
PyYAML==3.10
South==0.7.6
astroid==1.0.1
boto==2.27.0
coverage==3.6
dj-database-url==0.2.1
django-adminplus==0.1.7
django-fields==0.2.0
django-grappelli==2.4.0
django-jenkins==0.14.0
django-storages==1.1.5
-e git+https://github.com/toastdriven/django-tastypie.git@eee008f3eef0f756b32635e7b74c1c9732cf593c#egg=django_tastypie-dev
feedparser==5.1.2
gunicorn==0.14.6
logilab-astng==0.24.3
logilab-common==0.59.1
mimeparse==0.1.3
newrelic==2.8.0.7
psycopg2==2.4.5
pycrypto==2.6.1
pycurl==7.19.0
pylint==0.28.0
python-dateutil==1.5
raven==4.0.3
requests==1.0.4
six==1.6.1
stripe==1.7.7
wsgiref==0.1.2
答案 0 :(得分:2)
(答案实际上来自用户Kenneth Reitz,已在Heroku支持频道上得到解答。谢谢!)
由于这似乎不是与应用程序代码相关的问题,因此Heroku团队建议我使用此工具清除构建缓存:https://github.com/heroku/heroku-repo
我跑的命令是:
heroku plugins:install heroku-repo
heroku repo:purge_cache -a project-name
这似乎可以解决问题!