I've got a digitalocean droplet and I deployed web2py using this script. I installed matplotlib as follows:
ssh root@ipdroplet
apt-get install python-matplotlib
and I can indeed import matplotlib
if I simply run python
on the command line after I've ssh'd. The problem is that when I run my app I get the following error:
<type 'exceptions.ImportError'> Cannot import module applications.app.modules.matplotlib
I'm guessing this has something to do with user www-data
vs root
but no idea how to resolve it. Any help much appreciated. The tips that are mentioned in this link unfortunately didn't help me.
Thanks
EDIT
I should also mention that I'm not using the binary version of web2py. I've also managed to run python as www-data
by doing sudo -u www-data python
and I can import matplotlib there just fine.
EDIT2
When I was running locally on web2py 2.11.2-stable it worked fine. On my server though I was under 2.12.3-stable. I'm guessing this is probably the reason.