- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在将应用程序部署到 heroku 时遇到问题。我从根目录中名为 app.py 的文件启动服务器,并且我已将 Flask 安装在名为 Flask 的文件夹中的 venv 中,我收到的错误是“没有名为 Flask 的模块”
heroku日志如下:
2015-04-21T09:18:36.128263+00:00 app[web.1]: Traceback (most recent call last):
2015-04-21T09:18:36.135666+00:00 app[web.1]: ImportError: No module named flask
2015-04-21T09:18:36.135349+00:00 app[web.1]: from flask import Flask, url_for
2015-04-21T09:18:37.102956+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-21T09:18:37.072990+00:00 heroku[web.1]: Process exited with status 1
2015-04-21T10:03:46.376428+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-21T10:03:48.581259+00:00 heroku[web.1]: Starting process with command `python app.py --log-file=-`
2015-04-21T10:03:50.464852+00:00 app[web.1]: File "app.py", line 2, in <module>
2015-04-21T10:03:50.464953+00:00 app[web.1]: from flask import Flask, url_for
2015-04-21T10:03:50.465130+00:00 app[web.1]: ImportError: No module named flask
我的 app.py 是:
#!flask/bin/python
import os
from flask import Flask, url_for
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager
from flask.ext.restless import APIManager
from flask.ext.assets import Environment, Bundle
from sqlalchemy.dialects.postgresql import ARRAY
from marshmallow import Schema
from marshmallow import fields
import flask
import json
flashcards = Flask(__name__)
flashcards.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/flashcards'
db = SQLAlchemy(flashcards)
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
decks = db.relationship('Deck', backref='users')
class Deck(db.Model):
__tablename__ = 'decks'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
cards = db.relationship('Card', backref='deck')
user_id = db.Column(db.Integer, db.ForeignKey('users.id'), index=True)
last_session = db.Column(db.BigInteger)
session_num = db.Column(db.Integer, default=1)
class Card(db.Model):
__tablename__ = 'cards'
id = db.Column(db.Integer, primary_key=True)
question = db.Column(db.String, unique=True)
answer = db.Column(db.Text)
deck_id = db.Column(db.Integer, db.ForeignKey('decks.id'), index=True)
box_id = db.Column(db.Integer, default=0)
db.create_all()
manager = flask.ext.restless.APIManager(flashcards, flask_sqlalchemy_db=db)
manager.create_api(User, methods=['GET', 'POST', 'PUT', 'DELETE'])
manager.create_api(Deck, methods=['GET', 'POST', 'PUT','DELETE'])
manager.create_api(Card, methods=['GET', 'POST', 'PUT','DELETE'])
@flashcards.route('/')
def root():
return flashcards.send_static_file('index.html')
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
flashcards.run(host='0.0.0.0', port=port)
编辑:
需求.txt
alembic==0.7.5.post2
aniso8601==0.92
Flask==0.10.1
Flask-Assets==0.10
Flask-Migrate==1.3.1
Flask-RESTful==0.3.2
Flask-Restless==0.17.0
Flask-Script==2.0.5
Flask-SQLAlchemy==2.0
gunicorn==19.3.0
itsdangerous==0.24
Jinja2==2.7.3
Mako==1.0.1
MarkupSafe==0.23
marshmallow==1.2.4
mimerender==0.5.5
psycopg2==2.6
python-dateutil==2.4.2
python-mimeparse==0.1.4
pytz==2015.2
six==1.9.0
SQLAlchemy==0.9.9
webassets==0.10.1
Werkzeug==0.10.4
Heroku 构建输出
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Deleting 4 files matching .slugignore patterns.
remote: -----> Removing .DS_Store files
remote: -----> Python app detected
remote: -----> Installing runtime (python-2.7.9)
remote: -----> Installing dependencies with pip
remote: Collecting alembic==0.7.5.post2 (from -r requirements.txt (line 1))
remote: Downloading alembic-0.7.5.post2.tar.gz (616kB)
remote: Collecting aniso8601==0.92 (from -r requirements.txt (line 2))
remote: Downloading aniso8601-0.92.tar.gz
remote: Collecting Flask==0.10.1 (from -r requirements.txt (line 3))
remote: Downloading Flask-0.10.1.tar.gz (544kB)
remote: Collecting Flask-Assets==0.10 (from -r requirements.txt (line 4))
remote: Downloading Flask-Assets-0.10.tar.gz
remote: Collecting Flask-Migrate==1.3.1 (from -r requirements.txt (line 5))
remote: Downloading Flask-Migrate-1.3.1.tar.gz
remote: Collecting Flask-RESTful==0.3.2 (from -r requirements.txt (line 6))
remote: Downloading Flask_RESTful-0.3.2-py2.py3-none-any.whl
remote: Collecting Flask-Restless==0.17.0 (from -r requirements.txt (line 7))
remote: Downloading Flask-Restless-0.17.0.tar.gz (42kB)
remote: Collecting Flask-Script==2.0.5 (from -r requirements.txt (line 8))
remote: Downloading Flask-Script-2.0.5.tar.gz (42kB)
remote: Collecting Flask-SQLAlchemy==2.0 (from -r requirements.txt (line 9))
remote: Downloading Flask-SQLAlchemy-2.0.tar.gz (93kB)
remote: Collecting gunicorn==19.3.0 (from -r requirements.txt (line 10))
remote: Downloading gunicorn-19.3.0-py2.py3-none-any.whl (110kB)
remote: Collecting itsdangerous==0.24 (from -r requirements.txt (line 11))
remote: Downloading itsdangerous-0.24.tar.gz (46kB)
remote: Collecting Jinja2==2.7.3 (from -r requirements.txt (line 12))
remote: Downloading Jinja2-2.7.3.tar.gz (378kB)
remote: Collecting Mako==1.0.1 (from -r requirements.txt (line 13))
remote: Downloading Mako-1.0.1.tar.gz (473kB)
remote: Collecting MarkupSafe==0.23 (from -r requirements.txt (line 14))
remote: Downloading MarkupSafe-0.23.tar.gz
remote: Collecting marshmallow==1.2.4 (from -r requirements.txt (line 15))
remote: Downloading marshmallow-1.2.4-py2.py3-none-any.whl (42kB)
remote: Collecting mimerender==0.5.5 (from -r requirements.txt (line 16))
remote: Downloading mimerender-0.5.5.tar.gz
remote: Collecting psycopg2==2.6 (from -r requirements.txt (line 17))
remote: Downloading psycopg2-2.6.tar.gz (367kB)
remote: Collecting python-dateutil==2.4.2 (from -r requirements.txt (line 18))
remote: Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB)
remote: Collecting python-mimeparse==0.1.4 (from -r requirements.txt (line 19))
remote: Downloading python-mimeparse-0.1.4.tar.gz
remote: Collecting pytz==2015.2 (from -r requirements.txt (line 20))
remote: Downloading pytz-2015.2-py2.py3-none-any.whl (476kB)
remote: Collecting six==1.9.0 (from -r requirements.txt (line 21))
remote: Downloading six-1.9.0-py2.py3-none-any.whl
remote: Collecting SQLAlchemy==0.9.9 (from -r requirements.txt (line 22))
remote: Downloading SQLAlchemy-0.9.9.tar.gz (4.2MB)
remote: Collecting webassets==0.10.1 (from -r requirements.txt (line 23))
remote: Downloading webassets-0.10.1.tar.gz (167kB)
remote: Collecting Werkzeug==0.10.4 (from -r requirements.txt (line 24))
remote: Downloading Werkzeug-0.10.4-py2.py3-none-any.whl (293kB)
remote: Installing collected packages: Werkzeug, webassets, SQLAlchemy, six, pytz, python-mimeparse, python-dateutil, psycopg2, mimerender, marshmallow, MarkupSafe, Mako, Jinja2, itsdangerous, gunicorn, Flask-SQLAlchemy, Flask-Script, Flask-Restless, Flask-RESTful, Flask-Migrate, Flask-Assets, Flask, aniso8601, alembic
remote:
remote: Running setup.py install for webassets
remote: Installing webassets script to /app/.heroku/python/bin
remote: Running setup.py install for SQLAlchemy
remote: building 'sqlalchemy.cprocessors' extension
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c lib/sqlalchemy/cextension/processors.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o
remote: gcc -pthread -shared build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cprocessors.s
remote: building 'sqlalchemy.cresultproxy' extension
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c lib/sqlalchemy/cextension/resultproxy.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o
remote: gcc -pthread -shared build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cresultproxy.so
remote: building 'sqlalchemy.cutils' extension
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c lib/sqlalchemy/cextension/utils.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/utils.o
remote: gcc -pthread -shared build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/utils.o -o build/lib.linux-x86_64-2.7/sqlalchemy/cutils.so
remote:
remote:
remote: Running setup.py install for python-mimeparse
remote:
remote: Running setup.py install for psycopg2
remote: building 'psycopg2._psycopg' extension
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/green.c -o build/temp.linux-x86_64-2.7/psycopg/green.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/pqpath.c -o build/temp.linux-x86_64-2.7/psycopg/pqpath.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/utils.c -o build/temp.linux-x86_64-2.7/psycopg/utils.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/bytes_format.c -o build/temp.linux-x86_64-2.7/psycopg/bytes_format.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/connection_int.c -o build/temp.linux-x86_64-2.7/psycopg/connection_int.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/connection_type.c -o build/temp.linux-x86_64-2.7/psycopg/connection_type.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/cursor_int.c -o build/temp.linux-x86_64-2.7/psycopg/cursor_int.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/cursor_type.c -o build/temp.linux-x86_64-2.7/psycopg/cursor_type.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/diagnostics_type.c -o build/temp.linux-x86_64-2.7/psycopg/diagnostics_type.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/error_type.c -o build/temp.linux-x86_64-2.7/psycopg/error_type.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/lobject_int.c -o build/temp.linux-x86_64-2.7/psycopg/lobject_int.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/lobject_type.c -o build/temp.linux-x86_64-2.7/psycopg/lobject_type.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/notify_type.c -o build/temp.linux-x86_64-2.7/psycopg/notify_type.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/xid_type.c -o build/temp.linux-x86_64-2.7/psycopg/xid_type.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_asis.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_binary.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_binary.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_datetime.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_datetime.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_list.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_list.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_pboolean.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_pboolean.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_pdecimal.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_pdecimal.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_pint.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_pint.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_pfloat.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_pfloat.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/adapter_qstring.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_qstring.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/microprotocols.c -o build/temp.linux-x86_64-2.7/psycopg/microprotocols.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/microprotocols_proto.c -o build/temp.linux-x86_64-2.7/psycopg/microprotocols_proto.o -Wdeclaration-after-statement
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090306 -DHAVE_LO64=1 -I/app/.heroku/python/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/typecast.c -o build/temp.linux-x86_64-2.7/psycopg/typecast.o -Wdeclaration-after-statement
remote: gcc -pthread -shared build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o build/temp.linux-x86_64-2.7/psycopg/green.o build/temp.linux-x86_64-2.7/psycopg/pqpath.o build/temp.linux-x86_64-2.7/psycopg/utils.o build/temp.linux-x86_64-2.7/psycopg/bytes_format.o build/temp.linux-x86_64-2.7/psycopg/connection_int.o build/temp.linux-x86_64-2.7/psycopg/connection_type.o build/temp.linux-x86_64-2.7/psycopg/cursor_int.o build/temp.linux-x86_64-2.7/psycopg/cursor_type.o build/temp.linux-x86_64-2.7/psycopg/diagnostics_type.o build/temp.linux-x86_64-2.7/psycopg/error_type.o build/temp.linux-x86_64-2.7/psycopg/lobject_int.o build/temp.linux-x86_64-2.7/psycopg/lobject_type.o build/temp.linux-x86_64-2.7/psycopg/notify_type.o build/temp.linux-x86_64-2.7/psycopg/xid_type.o build/temp.linux-x86_64-2.7/psycopg/adapter_asis.o build/temp.linux-x86_64-2.7/psycopg/adapter_binary.o build/temp.linux-x86_64-2.7/psycopg/adapter_datetime.o build/temp.linux-x86_64-2.7/psycopg/adapter_list.o build/temp.linux-x86_64-2.7/psycopg/adapter_pboolean.o build/temp.linux-x86_64-2.7/psycopg/adapter_pdecimal.o build/temp.linux-x86_64-2.7/psycopg/adapter_pint.o build/temp.linux-x86_64-2.7/psycopg/adapter_pfloat.o build/temp.linux-x86_64-2.7/psycopg/adapter_qstring.o build/temp.linux-x86_64-2.7/psycopg/microprotocols.o build/temp.linux-x86_64-2.7/psycopg/microprotocols_proto.o build/temp.linux-x86_64-2.7/psycopg/typecast.o -L/usr/lib -lpq -o build/lib.linux-x86_64-2.7/psycopg2/_psycopg.so
remote: Running setup.py install for mimerender
remote:
remote: Running setup.py install for MarkupSafe
remote: building 'markupsafe._speedups' extension
remote: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c markupsafe/_speedups.c -o build/temp.linux-x86_64-2.7/markupsafe/_speedups.o
remote: gcc -pthread -shared build/temp.linux-x86_64-2.7/markupsafe/_speedups.o -o build/lib.linux-x86_64-2.7/markupsafe/_speedups.so
remote: Running setup.py install for Mako
remote: Installing mako-render script to /app/.heroku/python/bin
remote: Running setup.py install for Jinja2
remote: Running setup.py install for itsdangerous
remote: Compiling /tmp/pip-build-2z5fcv/gunicorn/gunicorn/workers/_gaiohttp.py
remote:
remote:
remote: Running setup.py install for Flask-SQLAlchemy
remote: Running setup.py install for Flask-Script
remote: Running setup.py install for Flask-Restless
remote:
remote: Running setup.py install for Flask-Migrate
remote: Running setup.py install for Flask-Assets
remote: Running setup.py install for Flask
remote: Running setup.py install for aniso8601
remote: Running setup.py install for alembic
remote: Installing alembic script to /app/.heroku/python/bin
remote: Successfully installed Flask-0.10.1 Flask-Assets-0.10 Flask-Migrate-1.3.1 Flask-RESTful-0.3.2 Flask-Restless-0.17.0 Flask-SQLAlchemy-2.0 Flask-Script-2.0.5 Jinja2-2.7.3 Mako-1.0.1 MarkupSafe-0.23 SQLAlchemy-0.9.9 Werkzeug-0.10.4 alembic-0.7.5.post2 aniso8601-0.92 gunicorn-19.3.0 itsdangerous-0.24 marshmallow-1.2.4 mimerender-0.5.5 psycopg2-2.6 python-dateutil-2.4.2 python-mimeparse-0.1.4 pytz-2015.2 six-1.9.0 webassets-0.10.1
remote:
remote: -----> Preparing static assets
remote: Collectstatic configuration error. To debug, run:
remote: $ heroku run python ./manage.py collectstatic --noinput
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing... done, 57.0MB
remote: -----> Launching... done, v5
最佳答案
确保您有一个包含依赖项的 requirements.txt
,如 https://devcenter.heroku.com/articles/python-pip 中所述。 .
关于python - 部署到 Heroku 时出现 "no module named flask"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29778269/
我有一堆字符串,其中包含以姓氏,名字格式命名的名称列表,并用逗号分隔,如下所示: names 序列化字符串中的“first name last name”,我们在Stack Overflow上找到一个
在尝试合并多个数据框时,我得到了一些非常奇怪的东西。帮助! 我需要通过“RID”和“VISCODE”列合并一堆数据框。这是它的外观示例: d1 = data.frame(ID = sample(9,
让我们尽可能简单地做第一个例子。 我想知道如何应用这个宏;像这里适用于例如printf("%s",macro(arg)); #include #include #include #define
以下2个bean声明之间有什么区别吗? @Bean(name = "bean1") public A getA() { return new A(); } @Bean @Quali
if(c.get_name(&name) && name && !strcmp(name, contName)) 谁能告诉我这行代码在 C++ 中的含义 最佳答案 如果 c 有一个名字并且它等于 co
我是 Rails 的初学者,在改进我的搜索查询时遇到了一些问题: 在我调用的 Controller 中: def index if params[:search] @persons = Pers
谁能帮我解决这段代码的最后一部分的编译错误它的说法创建构造函数请帮助 public class Officer { public static void main(String args[]
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 8 年前。 Improve t
我创建了一个 Web 应用程序,它具有使用 JSF 技术的 createBook.xhtml 并且它使用托管 Bean。在此页面中,用户必须在输入字段中填写所需信息,然后点击提交按钮。然后应使用 do
嘿,我正在尝试弄清楚如何将在 mySQL 中工作的语句转换为 PostgreSQL 并且很好奇是否有人知道解决方案。 这是在 mySQL 中有效的语句: def self.by_name(keywor
如果我要创建所有类型的类型,而不是使用字符串和原始类型,那么最大的缺点是什么? 通常它看起来像: String name = person.getName(); int age = person.ge
我正在尝试从以下内容中提取郊区名称: 12 street name, suburb name, CTG 1234 在 PHP 中使用正则表达式。 街道和郊区名称都可以是任意数量的单词长度。 CTG 是
我有一个呈现个人详细信息组件的父组件,并且正在注入(inject)父组件的验证器范围。如果我使用 v-validate 指令和 this.$validator.validateAll() 或 this
现在,据我了解,name[] 声明中的 extern 告诉编译器它的定义在其他地方(在我的程序中,我定义了它低于我使用它的部分)。但是为什么 strlen() 和 sizeof 会有不同的结果?str
我一直在解决一个问题: "Design a program that asks the user for a series of names (in no particular order). Aft
我的 XML 如下所示: 我想使用 JAXB 来阅读该内容。 我知道我能做到 @XmlRootElement(name="thing") public class Thing{
对于字符串 name[],我们可以使用 strlen(name)+1 和 sizeof(name) 互换 在我们的代码中没有经过深思熟虑?他们不一样吗?我检查了一下,发现两者的返回类型都是相同的,si
我正在尝试从以下内容中提取郊区名称: 12 street name, suburb name, CTG 1234 在 PHP 中使用正则表达式。 街道和郊区名称的长度可以是任意数量。 CTG 是 st
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 8 年前。 Improve t
bash 手册列出了 for 的语法。复合语句为for name [ [ in [ word ... ] ] ; ] do list ; done这意味着 do 之前的分号如果 in 是可选的子句省略
我是一名优秀的程序员,十分优秀!