[Tutor] libtiff--can't find library

Steven D'Aprano steve at pearwood.info
Sat Jun 30 03:52:21 CEST 2012


R Bruce van Dover wrote:

> ImportError: Failed to find TIFF library. Make sure that libtiff is 
> installed and its location is listed in PATH|LD_LIBRARY_PATH|..

> Libtiff is in the 'E:\\Python27\\lib\\site-packages' directory as it's 
> supposed to. So is, e.g., Numpy, which imports just fine.
> 
> What am I doing wrong? FWIW, I tried the PIL package, and had the same 
> problem (module not found). Why do these modules not import when Numpy, 
> matplotlib, scipy, etc. import as expected?

A couple of suggestions:

- the error message hints that the TIFF library may be listed in the 
environment variable LD_LIBRARY_PATH. Try setting that env var to
'E:\\Python27\\lib\\site-packages'. If tifflib is in a subdirectory, make sure 
you give the full subdirectory.

- you might like to investigate the tiffany package, which claims to be able 
to work with TIFFs without dependencies on PIL. Perhaps it is easier to work with?

http://pypi.python.org/pypi/tiffany




-- 
Steven


More information about the Tutor mailing list