When I tried to prepare the data analysis environment with CentOS6.5, I stumbled upon installing matplotlib.
First, install with pip normally
$ pip install matplotlib Downloading/unpacking matplotlib Downloading matplotlib-1.4.0.tar.gz (51.2MB): 51.2MB downloaded Running setup.py (path:/tmp/pip_build_vagrant/matplotlib/setup.py) egg_info for package matplotlib ============================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [1.4.0] python: yes [2.7.7 (default, Aug 25 2014, 16:44:54) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]] platform: yes [linux2] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.8.2] six: yes [using six version 1.7.3] dateutil: yes [using dateutil version 2.2] tornado: yes [using tornado version 4.0.1] pyparsing: yes [pyparsing was not found. It is required for mathtext support. pip/easy_install may attempt to install it after matplotlib.] pycxx: yes [Couldn't import. Using local copy.] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: no [Requires freetype2 2.4 or later. Found 2.3.11.] png: yes [version 1.2.49] qhull: yes [pkg-config information for 'qhull' could not be found. Using local copy.] ... ============================================================================ * The following required packages can not be built: * freetype ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_vagrant/matplotlib Storing debug log for failure in /home/vagrant/.pip/pip.log
It seems that there is no freetype, so install it.
$ sudo yum install freetype
If you install matplotlib again ...
$ pip install matplotlib Downloading/unpacking matplotlib ... * The following required packages can not be built: * freetype
The same error occurred. When I read the error message again,
freetype: no [Requires freetype2 2.4 or later. Foundd 2.3.11.]
Apparently, version 2.4 or higher is required, but 2.3.11 is included. (I wanted you to emphasize more, such as changing the color or displaying it at the bottom, not in the middle of a long error message.)
And it seems that yum can't install anything above 2.4, so here I downloaded the latest version from / releases / freetype /) and compiled it from the source. The latest version at this time (August 29, 2014) was 2.5.3.
$ tar xzvf freetype-2.5.3.tar.gz2 $ cd freetype-2.5.3 $ ./configure $ make $ make install
There was an error in make install. I stumbled a lot here as well. ..
After investigating, it seems that using gmake will solve the problem.
$ cd freetype-2.5.3 $ env GNUMAKE="/usr/local/bin/gmake" $ ./builds/unix/configure $ gmake $ gmake install
You have finally installed it. Install with pip again and the installation is completed successfully.
It took about half a day to put in one module. ..