New issue 12 by asmi.ca...@gmail.com: error in importing libtiff
http://code.google.com/p/pylibtiff/issues/detail?id=12
I am trying to use pylibtiff to read tiff files into numpy array.. i
installed the windows installer provided on the site and now if i try
importing, python encounters with following error:
>>> from libtiff import *
Traceback (most recent call last):
File "D:/Python27/testtifflib.py", line 4, in <module>
from libtiff import *
File "D:\Python27\lib\site-packages\libtiff\__init__.py", line 4, in
<module>
from .libtiff import libtiff, TIFF
File "D:\Python27\lib\site-packages\libtiff\libtiff.py", line 35, 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|..')
ImportError: Failed to find TIFF library. Make sure that libtiff is
installed and its location is listed in PATH|LD_LIBRARY_PATH|..
i also tried this :
import sys
sys.path.append("D:\\Python27\\Lib\\site-packages\\libtiff")
from libtiff import *
but same error persists.. what can be done in this case?? any help is
appreciated.. m i missing something here??
The referred missing TIFF library is the libtiff binary.
You can crab it from
http://gnuwin32.sourceforge.net/packages/tiff.htm
Another approach would be to use pure Python TIFF support.
For that TIFF library support should be disabled by not
importing the libtiff.py module (e.g. edit __init__.py file
accordingly).
Hi,
I have the same problem. I installed first 'tiff-3.8.2-1.exe'
and 'pylibtiff-0.1-svn.win32.exe' afterward. And the libtiff location is
listed under sys.path ...
So any ideas what to do?
Cheers, Sebi
Could you try adding the location of the libtiff dll file to the system
PATH environment variable so that os.environ['PATH'] contains this location.
And then try importing libtiff.