简体   繁体   中英

Flask | Heroku buildpack: odbc | Installating ODBC Driver 17 for SQL Server | error on Heroku buildpack-apt

I'm trying to push a Flask app on Heroku which uses an Azure SQL database with pyodbc and ODBC Driver 17 for SQL Server.

I followed the instructions from Heroku buildpack: odbc and created the following:

Aptfile:

https://github.com/heroku/heroku-buildpack-apt.git
https://github.com/heroku/heroku-buildpack-python.git
https://github.com/matt-bertoncello/python-pyodbc-buildpack.git
unixodbc
unixodbc-dev

Buildpacks:

构建包

edit:

Following heroku's website, I've added a runtime.txt with the following:

在此处输入图像描述

However when I push the master to heroku (git push heroku master), I get the following error:

错误构建包

If you are using heroku stack-22 (based on Ubuntu 22.04) then this buildpacks might not work. If what you are trying to accomplish is query from SQL server, then I would recommend using library pymssql. then you don't need any buildpacks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM