python-rrdtool-1.4.7在Mac OS X El Capitan上安装

时间:2016-02-21 13:45:32

标签: python macos rrd

我想使用python来讨论<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Autocomplete - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script> $(function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( "#tags" ).autocomplete({ source: availableTags }); }); </script> </head> <body> <div class="ui-widget"> <label for="tags">Tags: </label> <input id="tags"> </div> </body> </html> ,但是当我rrd时。像这样的警告:

pip install python-rrdtool

我曾多次尝试过,谁能告诉我?

1 个答案:

答案 0 :(得分:0)

我已经用@Stephen Ingram的建议解决了这个问题。

1.install rrdtool(brew install rrdtool

2.检查cairo、pango

3.run python setup.py install

➜  python-rrdtool-1.4.7  sudo python setup.py install
running install
running build
running build_ext
running build_configure
building 'rrdtoolmodule' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Irrdtool-1.4.7/src -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c rrdtool-1.4.7/bindings/python/rrdtoolmodule.c -o build/temp.macosx-10.11-intel-2.7/rrdtool-1.4.7/bindings/python/rrdtoolmodule.o
rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:69:18: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    args_count = PyTuple_Size(args);
               ~ ^~~~~~~~~~~~~~~~~~
rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:375:15: warning: implicit conversion loses integer precision: 'time_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    if ((ts = rrd_first(argc, argv)) == -1) {
            ~ ^~~~~~~~~~~~~~~~~~~~~
rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:400:15: warning: implicit conversion loses integer precision: 'time_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    if ((ts = rrd_last(argc, argv)) == -1) {
            ~ ^~~~~~~~~~~~~~~~~~~~
3 warnings generated.
In file included from rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:44:
In file included from /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:8:
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:1062:9: warning: 'SIZEOF_TIME_T' macro redefined [-Wmacro-redefined]
#define SIZEOF_TIME_T 4
        ^
rrdtool-1.4.7/bindings/python/../../rrd_config.h:357:9: note: previous definition is here
#define SIZEOF_TIME_T 8
        ^
1 warning generated.
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.11-intel-2.7/rrdtool-1.4.7/bindings/python/rrdtoolmodule.o -Lrrdtool-1.4.7/src/.libs -lrrd -o build/lib.macosx-10.11-intel-2.7/rrdtoolmodule.so
ld: warning: directory not found for option '-Lrrdtool-1.4.7/src/.libs'
ld: warning: directory not found for option '-Lrrdtool-1.4.7/src/.libs'
ld: warning: ignoring file /usr/local/lib/librrd.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/librrd.dylib
running install_lib
copying build/lib.macosx-10.11-intel-2.7/rrdtoolmodule.so -> /Library/Python/2.7/site-packages
running install_egg_info
Writing /Library/Python/2.7/site-packages/python_rrdtool-1.4.7-py2.7.egg-info