[英]Heroku: Failed to git push
嗨,我试图git推我的python应用程序,但不断获取错误消息。 这是迄今为止我能做的最好的事情。 错误如下:
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教程中的所有步骤(所有这些步骤)?
据我所知,我想我做到了。 但是你看到我会错过什么? 我有一个很大的requirements.txt列表(~40个依赖项)。 其中大部分都没有在我的应用中使用。 他们在那里是因为我pip freeze> requirements.txt这个庞大的列表会导致问题吗?
谢谢。
从Windows操作系统部署到Heroku时,我有一个非常类似的错误消息,虽然这可能对我没有帮助,但事实证明它实际上是一个简单的修复。
在requirements.txt中,我删除了linux不需要的包。
在我的情况下删除
winkerberos
这是为了支持Windows而安装的pip
requests-kerberos
这解决了这个问题。
如果您可以尝试在Linux机器上进行pip冻结,我建议使用它,以避免错过Windows C .h头文件的错误消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.