11/03/2015

pylibtiff fails on Ubuntu 14.10

I ran into this while setting up trackpy - after installing a recent git clone and trying to import the module in an ipython console, I got the following message:
Failed to find TIFF header file (may be need to run: sudo apt-get install libtiff4-dev)
A bit of a problem, as recent Ubuntus come with libtiff5-dev and it doesn't resolve the issue.
The message is actually libtiff's as can be easily checked with an 'import libtiff' statement.
According to bug discussions on Launchpad and Google Code this is due to Ubuntu providing a pylibtiff that's too old for its libtiff, so it hasn't caught on to version 5 yet.
The quick fix is to get the missing tiff_h_4_0_3.py and saving it in
/usr/lib/python2.7/dist-packages/libtiff/ (sudo that). Haven't put the module through its paces yet, but at least it loads without complaints now.
Also, for recent git versions of trackpy, Ubuntu's python-six is not recent enough (needs to be >=1.8).  Fixable with sudo pip install --upgrade six, if you happen to have pip around.

No comments: