Hello,
I have been trying to use pyodbc with Heroku deployment and after making some reasonable progress, I got stuck at the following error during a git Heroku push:
(venv) C:\Users\ (my user name here) \dashboard>git push heroku main
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 12 threads
Compressing objects: 100% (16/16), done.
Writing objects: 100% (17/17), 1.92 KiB | 985.00 KiB/s, done.
Total 17 (delta 9), reused 0 (delta 0), pack-reused 0
remote: Compressing source files… done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpacks:
remote: 1. hattps://github.com/heroku/heroku-buildpack-apt
remote: 2. heroku/python
remote: -----> Apt app detected
remote: -----> Detected Aptfile or Stack changes, flushing cache
remote: -----> Updating apt caches
remote: Get:1 hattp://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
. . .
remote: Get:10 hattp://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,122 kB]
remote: Get:11 hattp://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [945 kB]
remote: Fetched 17.0 MB in 2s (6,956 kB/s)
remote: Reading package lists…
remote: -----> Fetching .debs for unixodbc
remote: Reading package lists…
remote: Building dependency tree…
. . .
remote: Fetched 270 kB in 1s (497 kB/s)
remote: Download complete and in download only mode
remote: -----> Fetching .debs for unixodbc-dev
remote: Reading package lists…
remote: Building dependency tree…
. . .
remote: Fetched 225 kB in 0s (487 kB/s)
remote: Download complete and in download only mode
remote: -----> Fetching .debs for python-pyodbc
remote: Reading package lists…
remote: Building dependency tree…
remote: E: Unable to locate package python-pyodbc
remote: ! Push rejected, failed to compile Apt app.
remote:
remote: ! Push failed
Note: I’m using hattps or http above so the post doesn’t think it’s a link
Now some background information:
-
My working platform is Windows 10
-
I did make some progress past the missing sql.h issue reported here:
Deploying Dash app to Heroku with SQL server connection
- For that to be possible, I had to add an Aptfile to my app root directory containing:
unixodbc
unixodbc-dev
python-pyodbc
libsqliteodbc
After adding the Aptfile, I executed:
heroku buildpacks:add --index 1 GitHub - heroku/heroku-buildpack-apt
Once I added the buildbacks, I executed the git push heroku main at the top of the post, which led to the error in question.
It seems to me that the http location(s) for the pyodbc package(s) is either missing or corrupted.
Any help would be greatly appreciated.
Thank you!