简体   繁体   English

Heroku:git push失败了

[英]Heroku: Failed to git push

Hi I am attempting to git push my python app, but constantly obtain error messages. 嗨,我试图git推我的python应用程序,但不断获取错误消息。 This is the best that I can do so far. 这是迄今为止我能做的最好的事情。 Errors below: 错误如下:

remote:            gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/app/.heroku/miniconda/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
remote:            c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
remote:             #include <ffi.h>
remote:                             ^
remote:            compilation terminated.
remote:            error: command 'gcc' failed with exit status 1
remote:            
remote:            ----------------------------------------
remote: Command "/app/.heroku/miniconda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-HrTCjj/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-VNanYj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-HrTCjj/cffi/
remote: You are using pip version 8.1.1, however version 8.1.2 is available.
remote: You should consider upgrading via the 'pip install --upgrade pip' command.
remote: 
remote:  !     Push rejected, failed to compile Python/Conda app
remote: 
remote: Verifying deploy....
remote: 
remote: !   Push rejected to newhapp.
remote: 
To https://git.heroku.com/newhapp.git

$heroku logts --tail 
Slug compilation failed: failed to compile Python/Conda app

你是否遵循了heroku教程中的所有步骤(所有这些步骤)?

I think I did, in my best knowledge. 据我所知,我想我做到了。 But did you see what would I have missed? 但是你看到我会错过什么? I have a huge list of requirements.txt ( ~40 dependencies). 我有一个很大的requirements.txt列表(~40个依赖项)。 Most of them are not used in my app. 其中大部分都没有在我的应用中使用。 They are there because I pip freeze > requirements.txt Would this huge list cause the problem? 他们在那里是因为我pip freeze> requirements.txt这个庞大的列表会导致问题吗?

Thank you. 谢谢。

I had a really similar error message to this when deploying from Windows OS to Heroku, while this may not help everyone for me it actually turned out to be a simple fix. 从Windows操作系统部署到Heroku时,我有一个非常类似的错误消息,虽然这可能对我没有帮助,但事实证明它实际上是一个简单的修复。

In requirements.txt I removed packages that are not necessary for linux. 在requirements.txt中,我删除了linux不需要的包。

In my case removing 在我的情况下删除

winkerberos

which was pip installed for windows support alongside 这是为了支持Windows而安装的pip

requests-kerberos

which fixed the issue. 这解决了这个问题。

If you can try pip freeze on a linux machine I would recommend this instead, to avoid error messages for missing windows C .h header files. 如果您可以尝试在Linux机器上进行pip冻结,我建议使用它,以避免错过Windows C .h头文件的错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM