My name is Matt Shirley and I work as a Data Scientist in Oncology Bioinformatics at Novartis Institutes for BioMedical Research.

You can find my publications on ORCID and Scholar , and read my reviews on Publons . View the impact of my research products on ImpactStory . Send me a pull request on GitHub . Ask me about bioinformatics on Network with me on LinkedIn or Twitter . Find my things on Thingiverse.


Disclaimer: As an Amazon Associate I earn from qualifying purchases.
Powered by Flask.
Styled with Bootstrap.
Icons from Academicons.

title: Compiling matplotlib with custom freetype and png libraries post_date: 2014-03-27 12:35:52 post_name: compiling-matplotlib-with-custom-freetype-and-png-libraries

Compiling matplotlib with custom freetype and png libraries

When developing software and pipelines on my personal laptop I have no trouble installing any development libraries I may need - they're just a "sudo" away.

However, when I'm running what I've developed on a shared cluster where I have no admin privileges and don't want to bug the sysadmin (my boss) too much, I tend to install things in my home directory. This works well for most software, but one common annoyance is the matplotlib Python module.

Dependency hell

Matplotlib requires the development versions of both freetype2 and libpng. These compile and install in a custom prefix (for me /home/matt/.local) cleanly, however the include path is difficult to pass to the matplotlib script. One easier way to make matplotlib aware of these dependencies is to create pkg-config definitions for our custom development library installs:

Simply place these files in /home/matt/.local and export PKG_CONFIG_PATH=/home/matt/.local and python install--user and you're ready to go.

comments powered by Disqus