【发布时间】: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'
还有其他人遇到过这个问题吗?
【问题讨论】:
-
由于缺少 C 库,我还没有找到将 pymssql 部署到 heroku 的方法。如果你这样做,请发布一个答案。可能需要向 python buildpack 添加检查,就像他们为 cffi (github.com/heroku/heroku-buildpack-python/blob/master/bin/steps/…) 所做的那样
标签: python-2.7 heroku freetds pymssql