Question

I made a Python script that needs a libtiff module to run. Do you have any suggestions on how to install libtiff? I tried to do it using fink, but I got the following error:

Failed: no package found for specification libtiff!

I also installed libtiff using brew, and in this case I get

ImportError: No module named libtiff

Was it helpful?

Solution

Homebrew worked fine for me. Have you installed the Python bindings for libtiff? For example, ...

% brew install libtiff
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libtiff-4.0.3.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtiff-4.0.3.mavericks.bottle.tar.gz
  /usr/local/Cellar/libtiff/4.0.3: 254 files, 3.8M
% brew install python
% pip install --upgrade setuptools
% pip install --upgrade pip
% pip install numpy
% pip install -e svn+http://pylibtiff.googlecode.com/svn/trunk/
% python
Python 2.7.6 (default, Mar 12 2014, 18:28:55) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import libtiff
>>> libtiff
<module 'libtiff' from '/Users/me/src/svn/libtiff/__init__.pyc'>
>>> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top