在Mavericks上安装libtiff

时间:2013-11-19 20:45:51

标签: python homebrew osx-mavericks libtiff fink

我制作了一个需要运行libtiff模块的Python脚本。您对如何安装libtiff有什么建议吗?我尝试使用fink做到这一点,但是我收到了以下错误:

  

失败:找不到规范libtiff的包!

我还使用brew安装了libtiff,在这种情况下我得到了

  

ImportError:没有名为libtiff的模块

1 个答案:

答案 0 :(得分:1)

Homebrew对我很好。你安装了Python bindings for libtiff吗?例如,......

% 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'>
>>>