0

After successfully installing libtiff on win7 I try to run:

tif = TIFF.open("sometiff.tiff")

I get the following error:

File "C:\Python27\ArcGIS10.2\lib\site-packages\libtiff\libtiff_ctypes.py",
line 41, in <module> raise 
ImportError: Failed to find TIFF library.
Make sure that libtiff is installed and its location is listed in PATH|LD_LIBRARY_PATH|..

I'm not sure what I need to add to the windows path to make this work successfully.

Mr Mystery Guest
  • 1,464
  • 1
  • 18
  • 47
  • I think you need to provide more context. How did you install libtiff? Did you pip install some package? Are you using conda? Where did you get libtiff and how are you now trying to use it? – Phil Mar 22 '16 at 12:20
  • Installed libtiff with pip. Yes. Not heard of conda, so assume I'm not using it. Same as first answer. – Mr Mystery Guest Mar 22 '16 at 12:24

1 Answers1

0

The directory that contains the dll for libtiff needs to be in your PATH environment variable.

If you did pip install libtiff, then you would have installed it using libtiff from pypi. This seems to be a "wrapper" around libtiff, so you will also need to install the actual libtiff Setup program.

Depending on what you are doing, you may want to look into a more complete distribution of python on windows such as Anaconda, which seems to be quite popular, or Enthought, which the subscription version is well supported. (I believe there is a subscription version of Anaconda, but I have not used it.)

Phil
  • 5,822
  • 2
  • 31
  • 60