I\'m trying to install PyODBC on Heroku, but I get fatal error: sql.h: No such file or directory in the logs when pip runs. How do I fix this error?
I recently saw this error in Heroku. To fix this problem I took the following steps:
Add Apt File to the root folder, with the following:
unixodbc
unixodbc-dev
python-pyodbc
libsqliteodbc
Commit that
Run heroku buildpacks:clear
Run heroku buildpacks:add --index 1 heroku-community/apt
Push to Heroku
For me the problem was that I previously installed the buildpack for python, which was not needed. By running heroku buildpacks:clearI removed all un-needed buildpacka, then add back the one I needed. So if you do follow these steps be sure to make note of the build packs you need. To view the buildpacks you have run heroku buildpacks before following these steps.