Skip to content Skip to sidebar Skip to footer

Installing Pdftotext Library On Heroku

pdftotext library is a requirement in requirements.txt. While trying to push to heroku, I get the following error: remote: Running setup.py install for pdftotext: started

Solution 1:

From How do I install additional software packages that my application requires?:

We don't offer official support for installing extra packages but there are a couple of unsupported options.

One is the experimental heroku-apt-buildpack. You can use this by including any APT package in an Aptfile in your application. The buildpack will then install these packages on the dyno when you deploy your application.

So, to do this, first add the build pack:

heroku buildpacks:add --index 1 heroku-community/apt

Then, create an Aptfile in your source directory with the following contents:

libpoppler-cpp-dev

And deploy as you normally would. Let me know if that helps!

Post a Comment for "Installing Pdftotext Library On Heroku"