python - 我无法在 heroku 上部署我的 flask 应用程序

标签 python heroku deployment flask

我是 heroku 的新手,我正试图在那里部署我的应用程序。但它失败了,我收到以下消息:

   Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__
   file__='/tmp/pip_build_u21590/matplotlib/setup.py';exec(compile(getattr(tokenize
, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" inst
all --record /tmp/pip-4IJQX6-record/install-record.txt --single-version-external
ly-managed --compile failed with error code 1 in /tmp/pip_build_u21590/matplotli
b
Traceback (most recent call last):
File "/app/.heroku/python/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/
__init__.py", line 185, in main
return command.main(cmd_args)
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/
basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 70: ordinal
not in range(128)

!     Push rejected, failed to compile Python app

To git@heroku.com:salty-oasis-2440.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:salty-oasis-2440.git'

上面是我的要求列表:

  • flask ==0.10.1
  • configobj==5.0.0
  • unicorn ==19.1.1
  • itsdangerous==0.24
  • jinja2==2.7.2
  • matplotlib==1.3.1
  • networkx==1.8.1
  • numpy==1.8.1
  • pyparsing==1.5.7
  • python-dateutil==2.2
  • werkzeug==0.9.4

我做错了什么?

提前致谢!!!

最佳答案

这不是 Heroku 的问题。这是 known issue with pip有一个未发布的(截至 2014 年 11 月 26 日)修复。由于您使用的是 Python 2.7,您可以 manually patch pip现在。

关于python - 我无法在 heroku 上部署我的 flask 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26145542/

相关文章:

c# - 保持将使用任务计划程序运行的控制台应用程序更新

python 3.2 : can't import sqlite3 module

python - 创建自定义休息驱动节点 Django-Viewflow

heroku - 为什么我的 Flask 命令不能在 Heroku 上运行?

c# - 使用 Visual Studio 2010 开发以数据为中心的多用户 Windows 应用程序

windows - 如何在 Windows 上部署 CUDA 程序?

python - 将数字字符串行读入 python 中的单独列表中

python - 在 pycharm 中使用标准输入

heroku - 在 Heroku 评论应用程序上使用 N 个网络测功机和 M 个工作测功机

ruby-on-rails - 如何设置redis连接