【问题标题】:Deploying Python bottle app with pymssql on heroku在 heroku 上使用 pymssql 部署 Python Bottle 应用程序
【发布时间】:2016-04-15 10:19:24
【问题描述】:

我在使用 pymssql 将我的网站部署到 heroku 时遇到问题。我正在使用以下构建包,但仍然有错误:

heroku config:add BUILDPACK_URL=https://github.com/amanjain/heroku-buildpack-python-freetds-pymssql.git

这是我不断收到的错误:

remote:            warning: no files found matching 'pymssql_version.py'
remote:            warning: no files found matching 'win32/freetds.zip'
remote:            warning: no previously-included files matching '*' found under directory 'docs/_build'
remote:        Successfully installed pymssql
remote:        Cleaning up...
remote: -----> Installing dependencies with pip
remote:        Downloading/unpacking bottle==0.12.9 (from -r requirements.txt (line 1))
remote:          Running setup.py (path:/tmp/pip_build_u13919/bottle/setup.py) egg_info for package bottle
remote:            
remote:        Downloading/unpacking DateTime==4.0.1 (from -r requirements.txt (line 2))
remote:          Running setup.py (path:/tmp/pip_build_u13919/DateTime/setup.py) egg_info for package DateTime
remote:            
remote:        Downloading/unpacking functools32==3.2.3.post2 (from -r requirements.txt (line 3))
remote:          Could not find a version that satisfies the requirement functools32==3.2.3.post2 (from -r requirements.txt (line 3)) (from versions: 3.2.3-1, 3.2.3-1, 3.2.3-2, 3.2.3-2)
remote:        Cleaning up...
remote:        No distributions matching the version for functools32==3.2.3.post2 (from -r requirements.txt (line 3))
remote:        Storing debug log for failure in /app/.pip/pip.log
remote: 
remote:  !     Push rejected, failed to compile Python + FreeTDS + pymssql app
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to shelf2xerotest1.
remote: 
To https://git.heroku.com/shelf2xerotest1.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to     
'https://git.heroku.com/shelf2xerotest1.git'

还有其他人遇到过这个问题吗?

【问题讨论】:

标签: python-2.7 heroku freetds pymssql


【解决方案1】:

该 buildpack 似乎是为 Linux 系统构建的,而且您似乎正在尝试在 Windows 上安装它。

在跟踪日志中,它似乎在 win32 目录中寻找 FreeTDS 构建:

warning: no files found matching 'win32/freetds.zip'

它似乎也安装了 Python 2.7。如果您刚刚开始,我强烈建议您使用 Python 3。祝您好运。

【讨论】:

  • Windows?什么?!是赫鲁克!蟒蛇3?这个答案没有意义。
  • 这正是我从输出中指出的!这没有意义。为什么要找win32库?为什么问题中有 Python-2.7 标签?
  • 这不是win32编译错误,它说没有名为'win32/freetds.zip'的文件。与在windows上运行无关。日志中的所有路径都是 Unix 路径。 Python 2.7 可以正常运行,请不要通过提倡 python 3 来笼统地“回答”,它很懒。
  • 很公平,但它几乎不提倡使用 Python 3; 2 有一个 EOL,如果有人开始并选择,3 是要走的路。耻辱墙 -> 超级大国!
猜你喜欢
  • 2018-03-29
  • 1970-01-01
  • 1970-01-01
  • 2018-09-03
  • 2021-04-15
  • 1970-01-01
  • 2011-12-05
  • 2017-09-26
  • 1970-01-01
相关资源
最近更新 更多