I am attempting to deploy a project I made on to Heroku, but when I try to push the project with:
git push heroku master
it ends up giving me an error that looks like this:
appscript_3x/ext/ae.h:26:10: fatal error: Carbon/Carbon.h: No such file or directory
#include <Carbon/Carbon.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jq3tilcm/appscript/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-dpw2ji3n-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-jq3tilcm/appscript/
! Push rejected, failed to compile Python app.
I've tried searching around for what to do, but I can't find anyone with the same problem and I don't know where to go from here. Any help would be greatly appreciated.
I met the same problem as you when git push heroku master
my flask project. I'm not sure which package leads to this problem, but it is definitely due to one of over 100 packages.
Because I deployed successfully when I used the original requirements.txt
. But heroku declined push several times after I ran pip freeze > requirements.txt
, which added over 100 packages that installed automatically by anaconda. I removed some packages that cannot be found by heroku, and finally, it showed the same error as you met. Then I reset requirements.txt
to the original version and it worked!
My suggestion is that only adding the packages that you need and you are familiar with. Hope this can help you!