If you're installing matplotlib locally, like this (for example):
python setup.py install --prefix=/home/xbaker/.local/
you might run into the common problem of resolving a freetype dependence. Check your freetype version:
freetype-config --ftversion
I have version 2.2.1, but matplotlib requires at least 2.3. First we have to install a newer version of freetype. Download the source here:
http://sourceforge.net/projects/freetype/files/freetype2/
Unzip and install (I'm installing to my .local directory).
./configure --prefix=$HOME/.local
make
make install
Now we need to download and configure matplotlib. Download the source from here:
https://github.com/matplotlib/matplotlib/releases
When I attempted to install matplotlib directly:
python setup.py install --prefix=/home/xbaker/.local/
the build failed, saying that it still detected the old version of freetype on the system. The solution has two parts: first we inform python of the freetype version, then we fix the matplotlib script to ignore the old version. The first step comes from
http://mattshirley.com/compiling-matplotlib-with-custom-freetype-and-png-libraries
export PKG_CONFIG_PATH=/home/matt/.local
Unzip and look for the setupext.py file (it's in the root of the extracted archive). Edit the file, looking for lines 948-951:
Once the script
No comments:
Post a Comment