I\'ve install matplotlib in my virtualenv using pip. It was a failure at the beginning, but after I do easy_install -U distribute
, the installation goes smoothl
I had difficulty using matplotlib
with heroku
as well and the answers are very hard to find. This helped me.
Basically what you have to do is push the project with numpy
in the requirements.txt
. Only after this we have to add pandas and matplotlib
to the requirements.txt
.
I had the same problem then I noticed in the building app in heroku that by installing matplotlib, it wants to re-install numpy and there it crashes on that point. I removed numpy from the requirements file and it went smoothly.
For those currently looking this answer up, I just deployed on the lastest heroku with the latest matplotlib/numpy as a requirement (1.4.3, 1.9.2 respectively) without any issues.
Finally I'm able to manage this.
First of all, I use this buildpack: https://github.com/dbrgn/heroku-buildpack-python-sklearn To use this buildpack I run this (maybe it is not a necessary step):
heroku config:set BUILDPACK_URL=https://github.com/dbrgn/heroku-buildpack-python-sklearn/
Then I change the requirements.txt into this:
argparse==1.2.1
distribute==0.6.24
gunicorn==17.5
wsgiref==0.1.2
numpy==1.7.0
matplotlib==1.1.0
scipy==0.11.0
scikit-learn==0.13.1
The most important part here is I install matplotlib 1.1.0 (currently the newest is 1.3.0). Some "deprecated numpy API" warnings might be occurred. But in my case it seems to be alright.
And here is the result (the page site might probably down since I use the free server one) http://kokoropy.herokuapp.com/example/plotting