0

我正在尝试按照这些说明安装 PythonMagick。https://gist.github.com/tomekwojcik/2778301

当我到达时,$ make我得到了这个错误

Making all in pythonmagick_src
CXX      libpymagick_la-_DrawableFillRule.lo
_DrawableFillRule.cpp:3:10: fatal error: 'boost/python.hpp' file not found
#include <boost/python.hpp>
         ^
1 error generated.
make[1]: *** [libpymagick_la-_DrawableFillRule.lo] Error 1
make: *** [all-recursive] Error 1

如何在我的项目中安装 PythonMagick?任何可行的方法。我在互联网上的任何地方都找不到有用的说明。

4

1 回答 1

1

确保你有 boost-python brew boost-python。请注意版本号,因为您需要在1.59.0下面替换为正确的版本。

$ BOOST_ROOT=/usr/local/Cellar/boost/1.59.0
$ ./configure

编辑Makefilepythonmagick_src/Makefile包含 boost 库。您正在寻找两行:DEFAULT_INCLUDESLDFLAGS。您将在这些行的末尾添加增强路径,使它们看起来像这样:

DEFAULT_INCLUDES = -I. -I$(top_builddir)/config -I/usr/local/Cellar/boost/1.59.0/include
LDFLAGS = -L/usr/local/Cellar/boost-python/1.59.0/lib

那应该解决编译/链接错误。

于 2015-11-06T07:35:15.787 回答