Reputation: 1074
Hi I am attempting to git push my python app, but constantly obtain error messages. 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
Upvotes: 1
Views: 557
Reputation: 436
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.
In requirements.txt I removed packages that are not necessary for linux.
In my case removing
winkerberos
which was pip installed for windows support alongside
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.
Upvotes: 1
Reputation: 1074
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). 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?
Thank you.
Upvotes: 0
Reputation: 84
Did you follow all the steps in the heroku tutorial (all of them) ?
Upvotes: 0