1

Django アプリを Heroku にプッシュするたびにいくつかのエラーが発生しますGetting Started with Django on Heroku。Heroku の Web サイトでチュートリアルを進めています。

ローカルでページを表示できますit workedが、Heroku はプッシュを受け入れません。エラーは次のとおりです。

$ git push heroku master
Counting objects: 14, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (14/14), 2.64 KiB, done.
Total 14 (delta 1), reused 0 (delta 0)

-----> Python app detected
-----> Preparing Python runtime (python-3.3.2)
-----> Installing Distribute (0.6.36)
-----> Installing Pip (1.3.1)
-----> Installing dependencies using Pip (1.3.1)
   Exception:
   Traceback (most recent call last):
     File "/app/.heroku/python/lib/python3.3/site-packages/pip-1.3.1-py3.3.egg/pip/basecommand.py", line 139, in main
       status = self.run(options, args)
     File "/app/.heroku/python/lib/python3.3/site-packages/pip-1.3.1-py3.3.egg/pip/commands/install.py", line 240, in run
       for req in parse_requirements(filename, finder=finder, options=options):
     File "/app/.heroku/python/lib/python3.3/site-packages/pip-1.3.1-py3.3.egg/pip/req.py", line 1354, in parse_requirements
       line, comes_from=comes_from, default_vcs=options.default_vcs)
     File "/app/.heroku/python/lib/python3.3/site-packages/pip-1.3.1-py3.3.egg/pip/req.py", line 76, in from_editable
       res = cls(name, comes_from, source_dir=source_dir, editable=True, url=url)
     File "/app/.heroku/python/lib/python3.3/site-packages/pip-1.3.1-py3.3.egg/pip/req.py", line 43, in __init__
       req = pkg_resources.Requirement.parse(req)
     File "/app/.heroku/python/lib/python3.3/site-packages/distribute-0.6.36-py3.3.egg/pkg_resources.py", line 2681, in parse
       reqs = list(parse_requirements(s))
     File "/app/.heroku/python/lib/python3.3/site-packages/distribute-0.6.36-py3.3.egg/pkg_resources.py", line 2606, in parse_requirements
       line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
     File "/app/.heroku/python/lib/python3.3/site-packages/distribute-0.6.36-py3.3.egg/pkg_resources.py", line 2574, in scan_list
       raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
   ValueError: ('Expected version spec in', 'Django-origin/HEAD', 'at', '/HEAD')

   Storing complete log in /app/.pip/pip.log

!     Push rejected, failed to compile Python app

To git@heroku.com:grantcontrol.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:grantcontrol.git'

ここに私のrequirement.txt[Django 開発トランクと Python は 3.3.2] があります。

-e git://github.com/django/django.git@f4e9804567ce45ef01f6613ce194e96d293ac04b#egg=Django-origin/HEAD
dj-database-url==0.2.2
gunicorn==17.5

どうぞよろしくお願いいたします。

4

1 に答える 1

0

requirements.txtのエントリを変更しましDjango

-e git://github.com/django/django.git#egg=Django

これで問題は解決しました。

于 2013-12-11T22:16:21.037 に答える