Tuesday 17 May 2016

matplotlib installation

I am using Ubuntu 14.04, python 2.7.6, and I install matplotlib by sudo apt-get python-matplotlib. But when I import matplotlib, it says "ImportError: No module named matplotlib". It turns out that I have to install all the dependencies as well.

According to here, these steps should be taken

1. Enable Universe repository in software and updates
2. sudo apt-get update 
3. sudo apt-get build-dep python-matplotlib

After these steps, matplotlib still does not work. So I install the Anaconda, which is supposed to provide all the popular dependencies. It turns out that matplotlib still can not be imported. 

After a while, matplotlib suddenly works! As far as I can remember, I performed the numpy and scipy tests, and relaunches the ipython notebook. 

No comments:

Post a Comment