I have a python flask app I\'m running on Heroku which uses the soundfile library. After adding soundfile
to requirements.txt
Heroku gave me this e
Create an 'Aptfile' and add the following lines:
libasound2-dev python-dev python-numpy python-setuptools libsndfile-dev
This worked for me.
libsndfile1
isn't a Python library, so you can't install it via requirements.txt
.
One way to get this working is to use the apt buildpack alongside the Python buildpack:
Remove libsndfile1
from your requirements.txt
Configure your application to use two buildpacks:
heroku buildpacks:set heroku/python
heroku buildpacks:add --index 1 heroku-community/apt
heroku buildpacks
# Should show apt first, then python
Add an Aptfile listing Ubuntu packages to be installed:
libsndfile1
Commit your changes and push to deploy. You should see apt
packages installed first, then your regular Python deployment.