sardine2 / python

Life is short, I need python.
0 stars 0 forks source link

Heroku 部署 C compiler 问题(backup) #1

Open sardine2 opened 7 years ago

sardine2 commented 7 years ago

Title:打算将 oneshot 部署到 heroku时出现问题。

背景

现象

我想实现上述效果/目的时,遇到了这样的情况:

The C compiler used to compile Python gcc-4.2, and which is normally used to compile C extensions, is not available. You can explicitly specify which compiler to use by setting the CC environment variable, for example:

    CC=gcc python setup.py <command>

or if you are using MacOS X, you can try:

    CC=clang python setup.py <command>

requirements.txt 内容可见这里 :gist

分析

我已经做了以下尝试:

方案

我推测可以有以下几种解决方案,请问大家哪种思路正确,或有其它思路建议?

其实归根到底问题是,没搞懂是哪里出了问题。

sardine2 commented 7 years ago

我把 requirements.txt 替换成了下面这份:

Flask==0.12 Flask-WTF==0.14.2 Flask-Script==2.0.5 Flask-Login==0.4.0 Flask-Mail==0.9.1 Flask-Bootstrap==3.3.7.1 Flask-SQLAlchemy==2.2 Flask-Moment==0.5.1

WTForms==2.1 Werkzeug==0.11.15 itsdangerous==0.24 SQLAlchemy==1.1.6

Jinja2==2.9.4 gunicorn==19.7.1

然后按照以下步骤:

1 . enter $ heroku create oneshot02 2 . enter $ pip3 install -r requirements.txt 3 . enter $ git add . 4 . enter $ git commit -m 'just for test'

  1. enter $ git push heroku master
  2. enter $ heroku open

然后是:

终端命令是正常的,放在 gist

remote: Verifying deploy.... done. To https://git.heroku.com/oneshot02.git

  • [new branch] master -> master

但仍未成功:

第n次失败

看起来好似是快成功了

完整的heroku logs --tail 放在 gist了

2017-04-06T14:19:43.000000+00:00 app[api]: Build succeeded 2017-04-06T14:20:25.968541+00:00 heroku[web.1]: Starting process with command gunicorn manage:app --log-file - 2017-04-06T14:20:29.466605+00:00 app[web.1]: [2017-04-06 14:20:29 +0000] [4] [INFO] Starting gunicorn 19.7.1 2017-04-06T14:20:29.467224+00:00 app[web.1]: [2017-04-06 14:20:29 +0000] [4] [INFO] Listening at: http://0.0.0.0:17700 (4) 2017-04-06T14:20:29.467361+00:00 app[web.1]: [2017-04-06 14:20:29 +0000] [4] [INFO] Using worker: sync 2017-04-06T14:20:29.471651+00:00 app[web.1]: [2017-04-06 14:20:29 +0000] [8] [INFO] Booting worker with pid: 8 2017-04-06T14:20:29.570596+00:00 app[web.1]: [2017-04-06 14:20:29 +0000] [9] [INFO] Booting worker with pid: 9 2017-04-06T14:20:29.804516+00:00 heroku[web.1]: State changed from starting to up