Comment #3 on issue 30 by
wuxund...@gmail.com: Fail to import libtiff in
Ubuntu 14.04
https://code.google.com/p/pylibtiff/issues/detail?id=30
I did another new installation of Ubuntu 14.04. Didn't do any kind of
customization during the installation. After system bootup, I installed
python-libtiff and ipython. Here is the error message again:
ipython
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
Type "copyright", "credits" or "license" for more information.
IPython 1.2.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import libtiff
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-4492fa448634> in <module>()
----> 1 import libtiff
/usr/lib/python2.7/dist-packages/libtiff/__init__.py in <module>()
18 __all__ =
['TIFF', 'TIFFfile', 'TiffArray', 'TiffFile', 'TiffFiles', 'TiffChannelsAndFiles', 'TiffBase']
19
---> 20 from .libtiff_ctypes import libtiff, TIFF
21 from .tiff import TIFFfile, TIFFimage, TiffArray
22 from .tiff_file import TiffFile
/usr/lib/python2.7/dist-packages/libtiff/libtiff_ctypes.py in <module>()
62 include_tiff_h = os.path.join('/usr','include','tiff.h')
63 if not os.path.isfile(include_tiff_h):
---> 64 raise ValueError('Failed to find TIFF header file (may be
need to run: sudo apt-get install libtiff4-dev)')
65 # Read TIFFTAG_* constants for the header file:
66 f = open (include_tiff_h, 'r')
ValueError: Failed to find TIFF header file (may be need to run: sudo
apt-get install libtiff4-dev)