This is a custom Heroku buildpack for Python apps that use NumPy and/or SciPy, powered by pip.
Please open a GitHub for any problems encountered or feature requests. If are using this project and found it useful, please let me know! (Preferably by email: brandon.k.liu@gmail.com). I maintain this project on my spare time, and I am much more motivated to work on it if I know there are people who are benefiting.
This buildpack currently supports:
NumPy:
SciPy:
Note: SciPy should be compiled against the right minor version of NumPy, but
the patch version doesn't matter, e.g., SciPy 0.15.1 can be compiled against
1.9.0 or 1.9.1, but probably not 1.8. I checked every single case though --
you should run tests (numpy.test()
or scipy.test()
) if you aren't sure
that things will work.
This package will also install compiled runtime libraries for BLAS, LAPACK, ATLAS, and Fortran, which are needed by NumPy and SciPy at runtime.
If any of these issues are immediately impacting you, please open a Github issue so that I know that they are higher priority items.
For a new app:
heroku create --buildpack https://github.com/thenovices/heroku-buildpack-scipy
For an existing app:
heroku buildpacks:set https://github.com/thenovices/heroku-buildpack-scipy
You must specify your exact desired version in requirements.txt
(e.g.,
numpy==1.9.0
). If no version is specified, the latest version available will
be used. At this time, this buildpack does not support requirements of the
form numpy>=1.8
.
$ mkdir testheroku
$ cd testheroku
$ git init
$ heroku create --buildpack https://github.com/thenovices/heroku-buildpack-scipy
$ echo -e "numpy==1.9.2\nscipy==0.15.1" > requirements.txt
$ git add requirements.txt
$ git commit -m 'Added requirements'
$ git push heroku master
This fork is taken from @dbrgn -- I owe thanks to him, @wyn, and others for setting up a lot of the code here.