简体   繁体   English

尝试部署到Heroku时如何解决“严重错误:Carbon / Carbon.h:没有此类文件或目录”-(Django)

[英]How to fix “fatal error: Carbon/Carbon.h: No such file or directory”, when trying to deploy to Heroku - (Django)

I am attempting to deploy a project I made on to Heroku, but when I try to push the project with: 我试图将我所做的项目部署到Heroku,但是当我尝试使用以下方法推送项目时:

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. git push heroku master我的flask项目时,我遇到了与您相同的问题。 I'm not sure which package leads to this problem, but it is definitely due to one of over 100 packages. 我不确定哪个程序包会导致此问题,但这绝对是由于100多个程序包之一。

Because I deployed successfully when I used the original requirements.txt . 因为我使用原始的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. 但是在我运行pip freeze > requirements.txt之后,heroku几次拒绝了推送,该添加了anaconda自动安装的100多个软件包。 I removed some packages that cannot be found by heroku, and finally, it showed the same error as you met. 我删除了一些heroku无法找到的软件包,最后,它显示出与您遇到的错误相同的错误。 Then I reset requirements.txt to the original version and it worked! 然后,我将requirements.txt重置为原始版本,并且成功了!

My suggestion is that only adding the packages that you need and you are familiar with. 我的建议是仅添加您需要并且熟悉的软件包。 Hope this can help you! 希望这可以帮到你!

暂无
暂无

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

相关问题 无法在 Heroku 上部署 Flask 应用程序 [致命错误:mpfr.h:没有这样的文件或目录] - Failed To Deploy Flask App On Heroku [fatal error: mpfr.h: No such file or directory] 尝试在 MacBook 上安装 pygame 时如何修复“scrap.c:27:10:致命错误:找不到‘SDL.h’文件” - how to fix an "scrap.c:27:10: fatal error: 'SDL.h' file not found" when trying to install pygame onto MacBook 致命错误:cuda_runtime_api.h:尝试在 docker 中使用 cuda 时没有这样的文件或目录 - fatal error: cuda_runtime_api.h: No such file or directory when trying to use cuda in docker 尝试将 Django 应用程序部署到 Heroku 时出错 - 依赖冲突 - Error when trying to deploy Django app to Heroku - Conflicting Dependencies 尝试将 Django 应用程序部署到 heroku 时收集 Static 错误 - Collect Static Error when trying to deploy Django application to heroku 如何修复 PyAudio、PortAudio 的安装问题:“致命错误 C1083:无法打开包含文件:'portaudio.h':没有这样的文件或目录” - How to fix installation issues for PyAudio, PortAudio: "fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory" 致命错误:pyconfig.h:没有这样的文件或目录 - Fatal error: pyconfig.h: No such file or directory 致命错误:Python.h:没有这样的文件或目录 - fatal error: Python.h: No such file or directory Django Deploy使用Heroku - [Errno 2]没有这样的文件或目录 - Django Deploy using Heroku - [Errno 2] No such file or directory 尝试访问 Django 页面时,在 Heroku 上部署了 Django 应用程序时出现错误代码 H13 - Error code H13 with Django App deployed on Heroku when trying to access Django page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM