部署到Heroku时,Setup.py egg_info因需求pygobject而失败

时间:2015-04-04 14:22:16

标签: python django git heroku pip

我第一次尝试通过Heroku部署我的Django应用程序,所以如果这是一个新手问题,请耐心等待。

当我将我的git repo推送到heroku(git push heroku master)时,我收到以下错误:

remote:          Downloading pygobject-2.28.3.tar.bz2 (889kB)
remote:            Traceback (most recent call last):
remote:              File "<string>", line 20, in <module
remote:            Complete output from command python setup.py egg_info:
remote:            Traceback (most recent call last):
remote:
remote:              File "<string>", line 20, in <module
remote:            
remote:            ----------------------------------------
remote:            Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-jrpptt2d/pygobject
remote: 
remote:  !     Push rejected, failed to compile Python app
remote: 
remote: Verifying deploy...
remote: 
remote: !       Push rejected to arcane-springs-6117.
remote: 
To https://git.heroku.com/arcane-springs-6117.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/arcane-springs-6117.git'

从我通过谷歌搜索收集到的这可能是setuptools的问题,但我认为setuptools自动安装在Heroku上?我也尝试将setuptools添加到我的requirements.txt和我的Procfile中,但没有任何运气。

这是我的requirements.txt的内容:

Django==1.8
Pillow==2.7.0
PyYAML==3.11
awsebcli==3.2
cement==2.4.0
chardet
colorama==0.2.5
decorator==3.4.0
defer
dj-database-url==0.3.0
dj-static==0.0.6
django-activeurl==0.1.8
django-appconf==1.0.1
django-bootstrap-breadcrumbs==0.7.1
django-bootstrap3==5.2.0
django-classy-tags==0.6.1
django-compressor==1.4
django-debug-toolbar==1.3.0
django-extra-views==0.6.5
django-filter==0.9.2
django-haystack==2.3.1
django-model-utils==2.2
django-mptt==0.7.0
django-reversion==1.8.5
django-reversion-compare==0.4.0
django-toolbelt==0.0.1
djangorestframework==3.1.0
elasticsearch==1.4.0
gunicorn==19.2.1
html5lib==0.999
ipython==1.2.1
jdcal==1.0
jmespath==0.6.1
lxml==3.4.2
markdown2==2.3.0
mysqlclient==1.3.5
numpy==1.8.2
openpyxl==2.1.5
psycopg2==2.6
pycurl==7.19.3
pygobject
pysolr==3.3.0
pytesseract==0.2
python-apt==0.9.3.5ubuntu1
python-dateutil==2.4.2
requests==2.2.1
scipy==0.13.3
simplegeneric==0.8.1
six==1.5.2
sqlparse==0.1.14
static3==0.5.1
unattended-upgrades==0.1
urllib3==1.10.2
setuptools

我做错了什么?

提前感谢您的帮助!

编辑:错误消息的一半丢失了!

1 个答案:

答案 0 :(得分:0)

我之前见过这个错误:

git push origin master
To https://github.com/Joey-project/project.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/Joey-project/project.git'

发生这种情况的一个可能原因是因为不应该将他/她的分支推送到更新的远程分支。

如果我没记错的话,一般的方法是使用类似的东西:

git fetch origin; git merge origin/master

查看code push to heroku not working以获取更多信息可能会有用。也许它可以帮助你:)

古德勒克! ;)