disruptive
disruptive

Reputation: 5946

Heroku Python app with custom package in Aptfile : no python packages installed from requirements.txt

I'm attempting to install a package and I was pointed in the direction of installing heroku-buildpack-apt and heroku-buildpack-multi. This seems to work and now the project builds on the remote and I have installed multi using:

heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git

and installed the apt-get via including its reference in a .buildpacks file https://github.com/ddollar/heroku-buildpack-apt

Now put the packages in Aptfile which is:

libgeoip-dev

The remote now builds, but I I get complains about not finding gunicorn, which I assume is some kind of conflict because it is listed in requirements.txt Does the Aptfile override requirements?

Upvotes: 3

Views: 3672

Answers (1)

Austyns
Austyns

Reputation: 760

Add heroku/python to your buildpacks run

heroku buildpacks:clear # to clear previous configs
heroku buildpacks:add --index 1 heroku-community/apt # to enable heroku build packages in Aptfile
heroku buildpacks:add --index 2 heroku/python # to install python libs in requirement.txt 

Should build both in your next push

Upvotes: 1

Related Questions