Issue 12 in pylibtiff: error in importing libtiff

69 views
Skip to first unread message

pyli...@googlecode.com

unread,
Feb 2, 2011, 7:36:06 AM2/2/11
to pylibtif...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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??

pyli...@googlecode.com

unread,
Feb 3, 2011, 6:26:31 AM2/3/11
to pylibtif...@googlegroups.com

Comment #1 on issue 12 by pearu.peterson: error in importing libtiff
http://code.google.com/p/pylibtiff/issues/detail?id=12

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).

pyli...@googlecode.com

unread,
Jan 17, 2012, 7:42:10 AM1/17/12
to pylibtif...@googlegroups.com

Comment #2 on issue 12 by sebrh...@gmail.com: error in importing libtiff
http://code.google.com/p/pylibtiff/issues/detail?id=12

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

pyli...@googlecode.com

unread,
Jan 17, 2012, 8:26:27 AM1/17/12
to pylibtif...@googlegroups.com

Comment #3 on issue 12 by pearu.peterson: error in importing libtiff
http://code.google.com/p/pylibtiff/issues/detail?id=12

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.

pyli...@googlecode.com

unread,
Jun 26, 2013, 10:18:02 AM6/26/13
to pylibtif...@googlegroups.com

Comment #4 on issue 12 by marcaure...@gmail.com: error in importing libtiff
http://code.google.com/p/pylibtiff/issues/detail?id=12

I am encountering the same problem, I have tried all the suggestions except
to use pure Python TIFF support (as I have no idea how to do this). Does
anyone have a solution by now?

Thanks!

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

pyli...@googlecode.com

unread,
Oct 11, 2013, 1:24:04 AM10/11/13
to pylibtif...@googlegroups.com

Comment #5 on issue 12 by Neel.A.L...@gmail.com: error in importing libtiff
http://code.google.com/p/pylibtiff/issues/detail?id=12

I am having the same issues could more light be shed on how to install

pyli...@googlecode.com

unread,
Mar 12, 2014, 12:20:39 AM3/12/14
to pylibtif...@googlegroups.com

Comment #6 on issue 12 by HBStri...@googlemail.com: error in importing
libtiff
http://code.google.com/p/pylibtiff/issues/detail?id=12

Hi,
I had/have the same problem. I work on debian with 0.3.0~svn78-3.1 and
libtiff 4.0.3. I was able to get a work around by copying
/usr/share/pyshared/libtiff/tiff_h_4_0_1.py to my working directory and
rename it tiff_h_4_0_3.py. It should work putting it in
/usr/share/pyshared/libtiff but it didn't, but that's probably just because
of a stupid mistake.

Good luck
Ben

pyli...@googlecode.com

unread,
Jan 27, 2015, 2:59:00 PM1/27/15
to pylibtif...@googlegroups.com

Comment #7 on issue 12 by KevinSco...@gmail.com: error in importing libtiff
https://code.google.com/p/pylibtiff/issues/detail?id=12

If you use a 64-bit version of Windows, you should also copy libtiff3.dll
to C:\Windows\SysWOW64\

I did this and it worked for me.

pyli...@googlecode.com

unread,
Jan 28, 2015, 2:24:16 AM1/28/15
to pylibtif...@googlegroups.com

Comment #8 on issue 12 by nikhilga...@gmail.com: error in importing libtiff
https://code.google.com/p/pylibtiff/issues/detail?id=12

@Kevin : I tried that but still same problem

pyli...@googlecode.com

unread,
Feb 5, 2015, 10:38:53 AM2/5/15
to pylibtif...@googlegroups.com

Comment #9 on issue 12 by hzq....@gmail.com: error in importing libtiff
https://code.google.com/p/pylibtiff/issues/detail?id=12

@Kevin: I have been struggled with this problem for almost whole day, and
then this libtiff3.dll with 64-bit Windows 7 trick worked out, really nice.
Thanks a lot!
Reply all
Reply to author
Forward
0 new messages