py2cairo安装失败。检查“开罗”; >= 1.10.0 :未找到
我正在尝试使用 32 位 Python 2.7(来自 python.org)和来自 MacPorts 的 cairo 1.10.2 在我的 OS X 10.5 上安装 PyCairo(来自 tarball 源)。所以我正在安装“py2cairo”。当我运行 python ./waf configure 时,我发现
Checking for 'cairo' >= 1.10.0 : not found
这里有 cairo 文件...
$ ls /opt/local/include/cairo
cairo-deprecated.h cairo-gobject.h cairo-script-interpreter.h cairo-tee.h cairo-xlib-xrender.h cairo.h
cairo-features.h cairo-pdf.h cairo-script.h cairo-version.h cairo-xlib.h
cairo-ft.h cairo-ps.h cairo-svg.h cairo-xcb.h cairo-xml.h
$ ls /opt/local/lib/cairo
cairo-fdr.0.so* cairo-fdr.la* cairo-sphinx.0.so* cairo-sphinx.la* libcairo-trace.0.dylib* libcairo-trace.dylib@
cairo-fdr.a cairo-fdr.so@ cairo-sphinx.a cairo-sphinx.so@ libcairo-trace.a libcairo-trace.la*
但是我应该将哪个目录传递给哪个参数?这些看起来与指定 cairo 库无关:
$ python ./waf --help
./options()
waf [commands] [options]
Main commands (example: ./waf build -j4)
build : executes the build
clean : cleans the project
configure: configures the project
dist :
distcheck: checks if the project compiles (tarball from 'dist')
distclean: removes the build directory
install : installs the targets on the system
list : lists the targets to execute
step : executes tasks in a step-by-step fashion, for debugging
uninstall: removes the targets installed
update : updates the plugins from the *waflib/extras* directory
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-j JOBS, --jobs=JOBS amount of parallel jobs (1)
-k, --keep keep running happily even if errors are found
-v, --verbose verbosity level -v -vv or -vvv [default: 0]
--nocache ignore the WAFCACHE (if set)
--zones=ZONES debugging zones (task_gen, deps, tasks, etc)
--nopyc Do not install bytecode compiled .pyc files (configuration) [Default:install]
--nopyo Do not install optimised compiled .pyo files (configuration) [Default:install]
configure options:
-o OUT, --out=OUT build dir for the project
-t TOP, --top=TOP src dir for the project
--download try to download the tools if missing
build and install options:
-p, --progress -p: progress bar; -pp: ide output
--targets=TARGETS task generators, e.g. "target1,target2"
step options:
--files=FILES files to process, by regexp, e.g. "*/main.c,*/test/main.o"
install/uninstall options:
-f, --force force file installation
Installation directories:
By default, "waf install" will put the files in "/usr/local/bin", "/usr/local/lib" etc. An installation prefix other than "/usr/local" can be given using "--prefix", for example "
--prefix=$HOME"
--prefix=PREFIX installation prefix [default: '/usr/local/']
--destdir=DESTDIR installation root [default: '']
--exec-prefix=EXEC_PREFIX
installation prefix [Default: ${PREFIX}]
Pre-defined installation directories:
--bindir=BINDIR user executables [Default: ${EXEC_PREFIX}/bin]
--sbindir=SBINDIR system admin executables [Default: ${EXEC_PREFIX}/sbin]
--libexecdir=LIBEXECDIR
program executables [Default: ${EXEC_PREFIX}/libexec]
--sysconfdir=SYSCONFDIR
read-only single-machine data [Default: ${PREFIX}/etc]
--sharedstatedir=SHAREDSTATEDIR
modifiable architecture-independent data [Default: ${PREFIX}/com]
--localstatedir=LOCALSTATEDIR
modifiable single-machine data [Default: ${PREFIX}/var]
--libdir=LIBDIR object code libraries [Default: ${EXEC_PREFIX}/lib]
--includedir=INCLUDEDIR
C header files [Default: ${PREFIX}/include]
--oldincludedir=OLDINCLUDEDIR
C header files for non-gcc [Default: /usr/include]
--datarootdir=DATAROOTDIR
read-only arch.-independent data root [Default: ${PREFIX}/share]
--datadir=DATADIR read-only architecture-independent data [Default: ${DATAROOTDIR}]
--infodir=INFODIR info documentation [Default: ${DATAROOTDIR}/info]
--localedir=LOCALEDIR
locale-dependent data [Default: ${DATAROOTDIR}/locale]
--mandir=MANDIR man documentation [Default: ${DATAROOTDIR}/man]
--docdir=DOCDIR documentation root [Default: ${DATAROOTDIR}/doc/${PACKAGE}]
--htmldir=HTMLDIR html documentation [Default: ${DOCDIR}]
--dvidir=DVIDIR dvi documentation [Default: ${DOCDIR}]
--pdfdir=PDFDIR pdf documentation [Default: ${DOCDIR}]
--psdir=PSDIR ps documentation [Default: ${DOCDIR}]
C Compiler Options:
--check-c-compiler=CHECK_C_COMPILER
On this platform (darwin) the following C-Compiler will be checked by default: "gcc"
I am trying to install PyCairo (from tarball source) on my OS X 10.5 using 32-bit Python 2.7 (from python.org) and cairo 1.10.2 from MacPorts. So I am installing "py2cairo". When I run python ./waf configure
, I get
Checking for 'cairo' >= 1.10.0 : not found
I have cairo files here...
$ ls /opt/local/include/cairo
cairo-deprecated.h cairo-gobject.h cairo-script-interpreter.h cairo-tee.h cairo-xlib-xrender.h cairo.h
cairo-features.h cairo-pdf.h cairo-script.h cairo-version.h cairo-xlib.h
cairo-ft.h cairo-ps.h cairo-svg.h cairo-xcb.h cairo-xml.h
$ ls /opt/local/lib/cairo
cairo-fdr.0.so* cairo-fdr.la* cairo-sphinx.0.so* cairo-sphinx.la* libcairo-trace.0.dylib* libcairo-trace.dylib@
cairo-fdr.a cairo-fdr.so@ cairo-sphinx.a cairo-sphinx.so@ libcairo-trace.a libcairo-trace.la*
But what directory do I pass to which parameter? These do not look relevant in specifying the cairo library:
$ python ./waf --help
./options()
waf [commands] [options]
Main commands (example: ./waf build -j4)
build : executes the build
clean : cleans the project
configure: configures the project
dist :
distcheck: checks if the project compiles (tarball from 'dist')
distclean: removes the build directory
install : installs the targets on the system
list : lists the targets to execute
step : executes tasks in a step-by-step fashion, for debugging
uninstall: removes the targets installed
update : updates the plugins from the *waflib/extras* directory
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-j JOBS, --jobs=JOBS amount of parallel jobs (1)
-k, --keep keep running happily even if errors are found
-v, --verbose verbosity level -v -vv or -vvv [default: 0]
--nocache ignore the WAFCACHE (if set)
--zones=ZONES debugging zones (task_gen, deps, tasks, etc)
--nopyc Do not install bytecode compiled .pyc files (configuration) [Default:install]
--nopyo Do not install optimised compiled .pyo files (configuration) [Default:install]
configure options:
-o OUT, --out=OUT build dir for the project
-t TOP, --top=TOP src dir for the project
--download try to download the tools if missing
build and install options:
-p, --progress -p: progress bar; -pp: ide output
--targets=TARGETS task generators, e.g. "target1,target2"
step options:
--files=FILES files to process, by regexp, e.g. "*/main.c,*/test/main.o"
install/uninstall options:
-f, --force force file installation
Installation directories:
By default, "waf install" will put the files in "/usr/local/bin", "/usr/local/lib" etc. An installation prefix other than "/usr/local" can be given using "--prefix", for example "
--prefix=$HOME"
--prefix=PREFIX installation prefix [default: '/usr/local/']
--destdir=DESTDIR installation root [default: '']
--exec-prefix=EXEC_PREFIX
installation prefix [Default: ${PREFIX}]
Pre-defined installation directories:
--bindir=BINDIR user executables [Default: ${EXEC_PREFIX}/bin]
--sbindir=SBINDIR system admin executables [Default: ${EXEC_PREFIX}/sbin]
--libexecdir=LIBEXECDIR
program executables [Default: ${EXEC_PREFIX}/libexec]
--sysconfdir=SYSCONFDIR
read-only single-machine data [Default: ${PREFIX}/etc]
--sharedstatedir=SHAREDSTATEDIR
modifiable architecture-independent data [Default: ${PREFIX}/com]
--localstatedir=LOCALSTATEDIR
modifiable single-machine data [Default: ${PREFIX}/var]
--libdir=LIBDIR object code libraries [Default: ${EXEC_PREFIX}/lib]
--includedir=INCLUDEDIR
C header files [Default: ${PREFIX}/include]
--oldincludedir=OLDINCLUDEDIR
C header files for non-gcc [Default: /usr/include]
--datarootdir=DATAROOTDIR
read-only arch.-independent data root [Default: ${PREFIX}/share]
--datadir=DATADIR read-only architecture-independent data [Default: ${DATAROOTDIR}]
--infodir=INFODIR info documentation [Default: ${DATAROOTDIR}/info]
--localedir=LOCALEDIR
locale-dependent data [Default: ${DATAROOTDIR}/locale]
--mandir=MANDIR man documentation [Default: ${DATAROOTDIR}/man]
--docdir=DOCDIR documentation root [Default: ${DATAROOTDIR}/doc/${PACKAGE}]
--htmldir=HTMLDIR html documentation [Default: ${DOCDIR}]
--dvidir=DVIDIR dvi documentation [Default: ${DOCDIR}]
--pdfdir=PDFDIR pdf documentation [Default: ${DOCDIR}]
--psdir=PSDIR ps documentation [Default: ${DOCDIR}]
C Compiler Options:
--check-c-compiler=CHECK_C_COMPILER
On this platform (darwin) the following C-Compiler will be checked by default: "gcc"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好的,明白了这一部分。必须
在
python ./waf configure
之前添加,因为我的~/.MacOSX/environment.plist
文件中的PKG_CONFIG_PATH
中定义了一些其他路径。从阅读日志文件中得到这个
,然后意识到
/opt/local/bin/pkg-config --libs cairo
正在其他地方(GTK+ 目录)查找。 此处有一些附加信息。设置 PKG_CONFIG_PATH 变量后,我可以继续下一步。Okay, got this part. Had to add
before
python ./waf configure
as some other paths were defined inPKG_CONFIG_PATH
in my~/.MacOSX/environment.plist
file.Got this from reading the log file which said
And then realized that
/opt/local/bin/pkg-config --libs cairo
was looking somewhere else (GTK+ directory). Some additional info here. After setting thePKG_CONFIG_PATH
variable, I was able to move to the next step.我的路径是
My path is
尝试运行“导出PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/Cellar/libpng/1.5.13/lib/pkgconfig:/usr/local/Cellar/freetype/2.4.10/lib/pkgconfig:/usr/local/塞拉r/fontconfig/2.10.1/lib/pkgconfig:/usr/local/Cellar/pixman/0.28.0/lib/pkgconfig:/usr/local/Cellar/cairo/1.12.8/lib/pkgconfig:/opt/local /lib/pkgconfig”
这是唯一对我有帮助的事情。
http://dequeue.blogspot.com /2013/01/getting-py2cairo-installed-on-osx-w-brew.html
Try running "export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/Cellar/libpng/1.5.13/lib/pkgconfig:/usr/local/Cellar/freetype/2.4.10/lib/pkgconfig:/usr/local/Cellar/fontconfig/2.10.1/lib/pkgconfig:/usr/local/Cellar/pixman/0.28.0/lib/pkgconfig:/usr/local/Cellar/cairo/1.12.8/lib/pkgconfig:/opt/local/lib/pkgconfig"
this is the only thing that helped me.
http://dequeue.blogspot.com/2013/01/getting-py2cairo-installed-on-osx-w-brew.html
尝试执行本教程中给出的所有步骤,以实现 cairo for mac 的端到端构建:
http:// www.cairgraphics.org/end_to_end_build_for_mac_os_x/
我遇到了与您相同的问题,但是在执行此配置后成功完成!
Try running through all of the steps given in this tutorial for the end to end build of cairo for mac:
http://www.cairographics.org/end_to_end_build_for_mac_os_x/
I was running into the same issue as you, but after doing this configure finishes successfully!