Installing Matplotlib
Matplotlib is a very useful plotting library, which we will need for the next recipe. It depends on NumPy, but in all likelihood you already have NumPy installed.
How to do it...
We will see how Matplotlib can be installed in Windows, Linux, and Mac, and also how to install it from source.
Installing Matplotlib on Windows: Install with the Enthought distribution (http://www.enthought.com/products/epd.php).
It might be necessary to put the
msvcp71.dll
file in yourC:\Windows\system32
directory. You can get it from http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71.Installing Matplotlib on Linux: Let's see how Matplotlib can be installed in the various distributions of Linux:
The install command on Debian and Ubuntu is as follows:
sudo apt-get install python-matplotlib
The install command on Fedora/Redhat is as follows:
su - yum install python-matplotlib
Installing from source: Download the latest source from the
tar.gz
release at Sourceforge (http://sourceforge.net/projects/matplotlib/files/) or from the Git repository using the following command:git clone git://github.com/matplotlib/matplotlib.git
Once it has been downloaded, build and install as usual with the following command:
cd matplotlib python setup.py install
Installing Matplotlib on Mac: Get the latest DMG file from http://sourceforge.net/projects/matplotlib/files/matplotlib/, and install it.