安装python的igraph包

时间:2010-10-04 15:45:33

标签: python igraph

我已经为macosx Leopard 10.5.8下载了igraph 0.5.4 tar球。当我解压缩它然后运行:

sudo python setup.py install

我收到以下长错误消息:

    Include path: /usr/include /usr/local/include
Library path: 
running install
running bdist_egg
running egg_info
writing python_igraph.egg-info/PKG-INFO
writing top-level names to python_igraph.egg-info/top_level.txt
writing dependency_links to python_igraph.egg-info/dependency_links.txt
reading manifest file 'python_igraph.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_igraph.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.3-fat/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.3-fat-2.6
creating build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/__init__.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/clustering.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/colors.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/configuration.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/datatypes.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/drawing.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/formula.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/layout.py -> build/lib.macosx-10.3-fat-2.6/igraph
copying igraph/statistics.py -> build/lib.macosx-10.3-fat-2.6/igraph
creating build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/__init__.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/attributes.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/basic.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/bipartite.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/cliques.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/colortests.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/decomposition.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/edgeseq.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/flow.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/foreign.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/games.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/generators.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/isomorphism.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/iterators.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/layouts.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/operators.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/spectral.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/structural.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
copying igraph/test/vertexseq.py -> build/lib.macosx-10.3-fat-2.6/igraph/test
creating build/lib.macosx-10.3-fat-2.6/igraph/app
copying igraph/app/__init__.py -> build/lib.macosx-10.3-fat-2.6/igraph/app
copying igraph/app/shell.py -> build/lib.macosx-10.3-fat-2.6/igraph/app
running build_ext
building 'igraph.core' extension
creating build/temp.macosx-10.3-fat-2.6
creating build/temp.macosx-10.3-fat-2.6/src
gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -I/usr/include -I/usr/local/include -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/arpackobject.c -o build/temp.macosx-10.3-fat-2.6/src/arpackobject.o
In file included from /usr/include/math.h:26,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyport.h:235,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:58,
                 from src/arpackobject.h:27,
                 from src/arpackobject.c:24:
/usr/include/architecture/ppc/math.h:675: warning: conflicting types for built-in function ‘scalb’
In file included from src/arpackobject.c:24:
src/arpackobject.h:28:27: error: igraph/arpack.h: No such file or directory
In file included from src/arpackobject.h:29,
                 from src/arpackobject.c:24:
src/graphobject.h:28:27: error: igraph/igraph.h: No such file or directory
In file included from src/arpackobject.h:29,
                 from src/arpackobject.c:24:
src/graphobject.h:42: error: syntax error before ‘igraph_t’
src/graphobject.h:42: warning: no semicolon at end of struct or union
src/graphobject.h:44: error: ‘destructor’ redeclared as different kind of symbol
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/object.h:304: error: previous declaration of ‘destructor’ was here
src/graphobject.h:51: error: syntax error before ‘}’ token
src/graphobject.h:51: warning: data definition has no type or storage class
src/graphobject.h:53: error: syntax error before ‘*’ token
src/graphobject.h:55: error: syntax error before ‘*’ token
src/graphobject.h:56: error: syntax error before ‘*’ token
src/graphobject.h:57: error: syntax error before ‘*’ token
src/graphobject.h:58: error: syntax error before ‘*’ token
src/graphobject.h:59: error: syntax error before ‘*’ token
src/graphobject.h:61: error: syntax error before ‘*’ token
src/graphobject.h:62: error: syntax error before ‘*’ token
src/graphobject.h:63: error: syntax error before ‘*’ token
src/graphobject.h:64: error: syntax error before ‘*’ token
src/graphobject.h:65: error: syntax error before ‘*’ token
src/graphobject.h:66: error: syntax error before ‘*’ token
src/graphobject.h:67: error: syntax error before ‘*’ token
src/graphobject.h:68: error: syntax error before ‘*’ token
src/graphobject.h:69: error: syntax error before ‘*’ token
src/graphobject.h:70: error: syntax error before ‘*’ token
src/graphobject.h:71: error: syntax error before ‘*’ token
src/graphobject.h:72: error: syntax error before ‘*’ token
src/graphobject.h:73: error: syntax error before ‘*’ token
src/graphobject.h:74: error: syntax error before ‘*’ token
src/graphobject.h:99: error: syntax error before ‘*’ token
src/graphobject.h:100: error: syntax error before ‘*’ token
src/graphobject.h:101: error: syntax error before ‘*’ token
src/graphobject.h:102: error: syntax error before ‘*’ token
src/graphobject.h:103: error: syntax error before ‘*’ token
src/graphobject.h:104: error: syntax error before ‘*’ token
src/graphobject.h:105: error: syntax error before ‘*’ token
src/graphobject.h:106: error: syntax error before ‘*’ token
src/graphobject.h:107: error: syntax error before ‘*’ token
src/graphobject.h:108: error: syntax error before ‘*’ token
src/graphobject.h:109: error: syntax error before ‘*’ token
src/graphobject.h:110: error: syntax error before ‘*’ token
src/graphobject.h:111: error: syntax error before ‘*’ token
src/graphobject.h:112: error: syntax error before ‘*’ token
src/graphobject.h:113: error: syntax error before ‘*’ token
src/graphobject.h:114: error: syntax error before ‘*’ token
src/graphobject.h:115: error: syntax error before ‘*’ token
src/graphobject.h:116: error: syntax error before ‘*’ token
src/graphobject.h:117: error: syntax error before ‘*’ token
src/graphobject.h:118: error: syntax error before ‘*’ token
src/graphobject.h:119: error: syntax error before ‘*’ token
src/graphobject.h:120: error: syntax error before ‘*’ token
src/graphobject.h:121: error: syntax error before ‘*’ token
src/graphobject.h:122: error: syntax error before ‘*’ token
src/graphobject.h:123: error: syntax error before ‘*’ token
src/graphobject.h:124: error: syntax error before ‘*’ token
src/graphobject.h:125: error: syntax error before ‘*’ token
src/graphobject.h:126: error: syntax error before ‘*’ token
src/graphobject.h:127: error: syntax error before ‘*’ token
src/graphobject.h:129: error: syntax error before ‘*’ token
src/graphobject.h:130: error: syntax error before ‘*’ token
src/graphobject.h:131: error: syntax error before ‘*’ token
src/graphobject.h:132: error: syntax error before ‘*’ token
src/graphobject.h:133: error: syntax error before ‘*’ token
src/graphobject.h:134: error: syntax error before ‘*’ token
src/graphobject.h:135: error: syntax error before ‘*’ token
src/graphobject.h:136: error: syntax error before ‘*’ token
src/graphobject.h:137: error: syntax error before ‘*’ token
src/graphobject.h:138: error: syntax error before ‘*’ token
src/graphobject.h:139: error: syntax error before ‘*’ token
src/graphobject.h:140: error: syntax error before ‘*’ token
src/graphobject.h:142: error: syntax error before ‘*’ token
src/graphobject.h:143: error: syntax error before ‘*’ token
src/graphobject.h:144: error: syntax error before ‘*’ token
src/graphobject.h:145: error: syntax error before ‘*’ token
src/graphobject.h:147: error: syntax error before ‘*’ token
src/graphobject.h:156: error: syntax error before ‘*’ token
src/graphobject.h:157: error: syntax error before ‘*’ token
src/graphobject.h:158: error: syntax error before ‘*’ token
src/graphobject.h:159: error: syntax error before ‘*’ token
src/graphobject.h:160: error: syntax error before ‘*’ token
src/graphobject.h:161: error: syntax error before ‘*’ token
src/graphobject.h:162: error: syntax error before ‘*’ token
src/graphobject.h:164: error: syntax error before ‘*’ token
src/graphobject.h:165: error: syntax error before ‘*’ token
src/graphobject.h:166: error: syntax error before ‘*’ token
src/graphobject.h:167: error: syntax error before ‘*’ token
src/graphobject.h:168: error: syntax error before ‘*’ token
src/graphobject.h:169: error: syntax error before ‘*’ token
src/graphobject.h:170: error: syntax error before ‘*’ token
src/graphobject.h:172: error: syntax error before ‘*’ token
src/graphobject.h:173: error: syntax error before ‘*’ token
src/graphobject.h:174: error: syntax error before ‘*’ token
src/graphobject.h:175: error: syntax error before ‘*’ token
src/graphobject.h:176: error: syntax error before ‘*’ token
src/graphobject.h:177: error: syntax error before ‘*’ token
src/graphobject.h:179: error: syntax error before ‘*’ token
src/graphobject.h:180: error: syntax error before ‘*’ token
src/graphobject.h:182: error: syntax error before ‘*’ token
src/graphobject.h:183: error: syntax error before ‘*’ token
src/graphobject.h:184: error: syntax error before ‘*’ token
src/graphobject.h:185: error: syntax error before ‘*’ token
src/graphobject.h:186: error: syntax error before ‘*’ token
src/graphobject.h:187: error: syntax error before ‘*’ token
src/graphobject.h:188: error: syntax error before ‘*’ token
src/graphobject.h:190: error: syntax error before ‘*’ token
src/graphobject.h:191: error: syntax error before ‘*’ token
src/graphobject.h:193: error: syntax error before ‘*’ token
src/graphobject.h:194: error: syntax error before ‘*’ token
src/graphobject.h:196: error: syntax error before ‘*’ token
src/graphobject.h:197: error: syntax error before ‘*’ token
src/graphobject.h:198: error: syntax error before ‘*’ token
src/graphobject.h:199: error: syntax error before ‘*’ token
src/graphobject.h:200: error: syntax error before ‘*’ token
src/graphobject.h:201: error: syntax error before ‘*’ token
src/graphobject.h:202: error: syntax error before ‘*’ token
src/graphobject.h:203: error: syntax error before ‘*’ token
src/graphobject.h:205: error: syntax error before ‘*’ token
src/graphobject.h:206: error: syntax error before ‘*’ token
src/graphobject.h:207: error: syntax error before ‘*’ token
src/graphobject.h:208: error: syntax error before ‘*’ token
src/graphobject.h:209: error: syntax error before ‘*’ token
src/graphobject.h:211: error: syntax error before ‘*’ token
src/graphobject.h:213: error: syntax error before ‘*’ token
src/graphobject.h:214: error: syntax error before ‘*’ token
In file included from src/arpackobject.c:24:
src/arpackobject.h:43: error: syntax error before ‘igraph_arpack_options_t’
src/arpackobject.h:43: warning: no semicolon at end of struct or union
src/arpackobject.h:44: warning: data definitiIn file included from src/arpackobject.c:24:
src/arpackobject.h:28:27: error: igraph/arpack.h: No such file or directory
In file included from src/arpackobject.h:29,
                 from src/arpackobject.c:24:
src/graphobject.h:28:27: error: igraph/igraph.h: No such file or directory
on has no type or storage class
src/arpackobject.h:45: warning: data definition has no type or storage class
In file included from src/arpackobject.h:29,
                 from src/arpackobject.c:24:
src/graphobject.h:42: error: syntax error before ‘igraph_t’
src/graphobject.h:42: warning: no semicolon at end of struct or union
src/graphobject.h:44: error: ‘destructor’ redeclared as different kind of symbolsrc/arpackobject.h:49: error: syntax error before ‘*’ token
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/object.h:304: error: previous declaration of ‘destructor’ was here

src/graphobject.h:51: error: syntax error before ‘}’ token
src/graphobject.h:51: warning: data definition has no type or storage class
src/graphobject.h:53: error: syntax error before ‘*’ token
src/arpackobject.h:52: error: syntax error before ‘*’ token
src/arpackobject.h:54: error: syntax error before ‘*’ token
src/arpackobject.h:54: error: syntax error before ‘*’ token
src/arpackobject.h:54: warning: data definition has no type or storage class
src/graphobject.h:55: error: syntax error before ‘*’ token
src/graphobject.h:56: error: syntax error before ‘*’ token
src/graphobject.h:57: error: syntax error before ‘*’ token
src/graphobject.h:58: error: syntax error before ‘*’ token
src/graphobject.h:59: error: syntax error before ‘*’ token
src/graphobject.h:61: error: syntax error before ‘*’ token
src/graphobject.h:62: error: syntax error before ‘*’ token
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_new’:src/graphobject.h:63: error: syntax error before ‘*’ token

src/arpackobject.c:44: error: ‘self’ undeclared (first use in this function)
src/arpackobject.c:44: error: (Each undeclared identifier is reported only once
src/arpackobject.c:44: error: for each function it appears in.)
src/arpackobject.c:45: error: syntax error before ‘)’ tokensrc/graphobject.h:64: error: syntax error before ‘*’ token
src/graphobject.h:65: error: syntax error before ‘*’ token

src/arpackobject.c: At top level:src/graphobject.h:66: error: syntax error before ‘*’ token
src/arpackobject.c:59: error: syntax error before ‘*’ token

src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_dealloc’:
src/arpackobject.c:61: error: ‘self’ undeclared (first use in this function)src/graphobject.h:67: error: syntax error before ‘*’ token

src/arpackobject.c: At top level:
src/graphobject.h:68: error: syntax error before ‘*’ token
src/graphobject.h:69: error: syntax error before ‘*’ tokensrc/arpackobject.c:68: error: syntax error before ‘*’ token

src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_getattr’:src/graphobject.h:70: error: syntax error before ‘*’ token
src/arpackobject.c:71: error: ‘attrname’ undeclared (first use in this function)

src/graphobject.h:71: error: syntax error before ‘*’ tokensrc/arpackobject.c:72: error: ‘self’ undeclared (first use in this function)
src/graphobject.h:72: error: syntax error before ‘*’ token

src/graphobject.h:73: error: syntax error before ‘*’ token
src/graphobject.h:74: error: syntax error before ‘*’ token
src/graphobject.h:99: error: syntax error before ‘*’ token
src/graphobject.h:100: error: syntax error before ‘*’ token
src/graphobject.h:101: error: syntax error before ‘*’ token
src/graphobject.h:102: error: syntax error before ‘*’ token
src/graphobject.h:103: error: syntax error before ‘*’ token
src/graphobject.h:104: error: syntax error before ‘*’ token
src/graphobject.h:105: error: syntax error before ‘*’ token
src/graphobject.h:106: error: syntax error before ‘*’ token
src/graphobject.h:107: error: syntax error before ‘*’ token
src/arpackobject.c: At top level:src/graphobject.h:108: error: syntax error before ‘*’ token

src/arpackobject.c:122: error: syntax error before ‘*’ token
src/graphobject.h:109: error: syntax error before ‘*’ token
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_setattr’:
src/graphobject.h:110: error: syntax error before ‘*’ tokensrc/arpackobject.c:124: error: ‘value’ undeclared (first use in this function)

src/arpackobject.c:128: error: ‘attrname’ undeclared (first use in this function)src/graphobject.h:111: error: syntax error before ‘*’ token

src/graphobject.h:112: error: syntax error before ‘*’ tokensrc/arpackobject.c:132: error: ‘self’ undeclared (first use in this function)
src/graphobject.h:113: error: syntax error before ‘*’ token

src/graphobject.h:114: error: syntax error before ‘*’ token
src/arpackobject.c:143: error: ‘igraph_real_t’ undeclared (first use in this function)src/graphobject.h:115: error: syntax error before ‘*’ token
src/graphobject.h:116: error: syntax error before ‘*’ token

src/arpackobject.c:143: error: syntax error before ‘PyInt_AsLong’
src/graphobject.h:117: error: syntax error before ‘*’ token
src/arpackobject.c:145: error: syntax error before ‘PyFloat_AsDouble’
src/graphobject.h:118: error: syntax error before ‘*’ token
src/graphobject.h:119: error: syntax error before ‘*’ token
src/graphobject.h:120: error: syntax error before ‘*’ token
src/arpackobject.c: At top level:src/graphobject.h:121: error: syntax error before ‘*’ token
src/graphobject.h:122: error: syntax error before ‘*’ token

src/arpackobject.c:159: error: syntax error before ‘*’ token
src/arpackobject.c:160: error: syntax error before ‘*’ token
src/graphobject.h:123: error: syntax error before ‘*’ token
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_get’:
src/arpackobject.c:161: error: ‘self’ undeclared (first use in this function)
src/graphobject.h:124: error: syntax error before ‘*’ token
src/arpackobject.c: At top level:
src/arpackobject.c:179: error: syntax error before ‘*’ token
src/graphobject.h:125: error: syntax error before ‘*’ token
src/graphobject.h:126: error: syntax error before ‘*’ token
src/graphobject.h:127: error: syntax error before ‘*’ token
src/graphobject.h:129: error: syntax error before ‘*’ token
src/graphobject.h:130: error: syntax error before ‘*’ token
src/arpackobject.c:220: error: initializer element is not constantsrc/graphobject.h:131: error: syntax error before ‘*’ token
src/arpackobject.c:220: error: (near initialization for ‘igraphmodule_ARPACKOptionsType.tp_dealloc’)

src/arpackobject.c:220: error: syntax error before ‘igraphmodule_ARPACKOptions_dealloc’
src/graphobject.h:132: error: syntax error before ‘*’ token
src/graphobject.h:133: error: syntax error before ‘*’ token
src/graphobject.h:134: error: syntax error before ‘*’ token
src/graphobject.h:135: error: syntax error before ‘*’ token
src/graphobject.h:136: error: syntax error before ‘*’ token
src/graphobject.h:137: error: syntax error before ‘*’ token
src/graphobject.h:138: error: syntax error before ‘*’ token
src/graphobject.h:139: error: syntax error before ‘*’ token
src/graphobject.h:140: error: syntax error before ‘*’ token
src/graphobject.h:142: error: syntax error before ‘*’ token
src/graphobject.h:143: error: syntax error before ‘*’ token
src/graphobject.h:144: error: syntax error before ‘*’ token
src/graphobject.h:145: error: syntax error before ‘*’ token
src/graphobject.h:147: error: syntax error before ‘*’ token
src/graphobject.h:156: error: syntax error before ‘*’ token
src/graphobject.h:157: error: syntax error before ‘*’ token
src/graphobject.h:158: error: syntax error before ‘*’ token
src/graphobject.h:159: error: syntax error before ‘*’ token
src/graphobject.h:160: error: syntax error before ‘*’ token
src/graphobject.h:161: error: syntax error before ‘*’ token
src/graphobject.h:162: error: syntax error before ‘*’ token
src/graphobject.h:164: error: syntax error before ‘*’ token
src/graphobject.h:165: error: syntax error before ‘*’ token
src/graphobject.h:166: error: syntax error before ‘*’ token
src/graphobject.h:167: error: syntax error before ‘*’ token
src/graphobject.h:168: error: syntax error before ‘*’ token
src/graphobject.h:169: error: syntax error before ‘*’ token
src/graphobject.h:170: error: syntax error before ‘*’ token
src/graphobject.h:172: error: syntax error before ‘*’ token
src/graphobject.h:173: error: syntax error before ‘*’ token
src/graphobject.h:174: error: syntax error before ‘*’ token
src/graphobject.h:175: error: syntax error before ‘*’ token
src/graphobject.h:176: error: syntax error before ‘*’ token
src/graphobject.h:177: error: syntax error before ‘*’ token
src/graphobject.h:179: error: syntax error before ‘*’ token
src/graphobject.h:180: error: syntax error before ‘*’ token
src/graphobject.h:182: error: syntax error before ‘*’ token
src/graphobject.h:183: error: syntax error before ‘*’ token
src/graphobject.h:184: error: syntax error before ‘*’ token
src/graphobject.h:185: error: syntax error before ‘*’ token
src/graphobject.h:186: error: syntax error before ‘*’ token
src/graphobject.h:187: error: syntax error before ‘*’ token
src/graphobject.h:188: error: syntax error before ‘*’ token
src/graphobject.h:190: error: syntax error before ‘*’ token
src/graphobject.h:191: error: syntax error before ‘*’ token
src/graphobject.h:193: error: syntax error before ‘*’ token
src/graphobject.h:194: error: syntax error before ‘*’ token
src/graphobject.h:196: error: syntax error before ‘*’ token
src/graphobject.h:197: error: syntax error before ‘*’ token
src/graphobject.h:198: error: syntax error before ‘*’ token
src/graphobject.h:199: error: syntax error before ‘*’ token
src/graphobject.h:200: error: syntax error before ‘*’ token
src/graphobject.h:201: error: syntax error before ‘*’ token
src/graphobject.h:202: error: syntax error before ‘*’ token
src/graphobject.h:203: error: syntax error before ‘*’ token
src/graphobject.h:205: error: syntax error before ‘*’ token
src/graphobject.h:206: error: syntax error before ‘*’ token
src/graphobject.h:207: error: syntax error before ‘*’ token
src/graphobject.h:208: error: syntax error before ‘*’ token
src/graphobject.h:209: error: syntax error before ‘*’ token
src/graphobject.h:211: error: syntax error before ‘*’ token
src/graphobject.h:213: error: syntax error before ‘*’ token
src/graphobject.h:214: error: syntax error before ‘*’ token
In file included from src/arpackobject.c:24:
src/arpackobject.h:43: error: syntax error before ‘igraph_arpack_options_t’
src/arpackobject.h:43: warning: no semicolon at end of struct or union
src/arpackobject.h:44: warning: data definition has no type or storage class
src/arpackobject.h:45: warning: data definition has no type or storage class
src/arpackobject.h:49: error: syntax error before ‘*’ token
src/arpackobject.h:52: error: syntax error before ‘*’ token
src/arpackobject.h:54: error: syntax error before ‘*’ token
src/arpackobject.h:54: error: syntax error before ‘*’ token
src/arpackobject.h:54: warning: data definition has no type or storage class
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_new’:
src/arpackobject.c:44: error: ‘self’ undeclared (first use in this function)
src/arpackobject.c:44: error: (Each undeclared identifier is reported only once
src/arpackobject.c:44: error: for each function it appears in.)
src/arpackobject.c:45: error: syntax error before ‘)’ token
src/arpackobject.c: At top level:
src/arpackobject.c:59: error: syntax error before ‘*’ token
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_dealloc’:
src/arpackobject.c:61: error: ‘self’ undeclared (first use in this function)
src/arpackobject.c: At top level:
src/arpackobject.c:68: error: syntax error before ‘*’ token
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_getattr’:
src/arpackobject.c:71: error: ‘attrname’ undeclared (first use in this function)
src/arpackobject.c:72: error: ‘self’ undeclared (first use in this function)
src/arpackobject.c: At top level:
src/arpackobject.c:122: error: syntax error before ‘*’ token
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_setattr’:
src/arpackobject.c:124: error: ‘value’ undeclared (first use in this function)
src/arpackobject.c:128: error: ‘attrname’ undeclared (first use in this function)
src/arpackobject.c:132: error: ‘self’ undeclared (first use in this function)
src/arpackobject.c:143: error: ‘igraph_real_t’ undeclared (first use in this function)
src/arpackobject.c:143: error: syntax error before ‘PyInt_AsLong’
src/arpackobject.c:145: error: syntax error before ‘PyFloat_AsDouble’
src/arpackobject.c: At top level:
src/arpackobject.c:159: error: syntax error before ‘*’ token
src/arpackobject.c:160: error: syntax error before ‘*’ token
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_get’:
src/arpackobject.c:161: error: ‘self’ undeclared (first use in this function)
src/arpackobject.c: At top level:
src/arpackobject.c:179: error: syntax error before ‘*’ token
src/arpackobject.c:220: error: initializer element is not constant
src/arpackobject.c:220: error: (near initialization for ‘igraphmodule_ARPACKOptionsType.tp_dealloc’)
src/arpackobject.c:220: error: syntax error before ‘igraphmodule_ARPACKOptions_dealloc’
lipo: can't figure out the architecture type of: /var/folders/dh/dhQ69HGyEnCzfiZ9fG+NKE+++TI/-Tmp-//cci7rbrc.out
error: command 'gcc-4.0' failed with exit status 1

这是一个错误还是我做错了什么?

最好,托马斯

2 个答案:

答案 0 :(得分:9)

您下载的内容只是igraph库的Python 界面。库本身是用C语言编写的,在尝试编译Python接口之前,你必须先安装igraph的C核。

基本上,你有三个选择:

  1. 尝试使用PyPI page of igraph上找到的igraph的预编译Mac OS X安装程序。

  2. 首先编译并安装C内核,然后再重新编译Python。可以从igraph homepage

  3. 下载C核的源代码
  4. 安装brew,然后从命令行使用brew安装igraph的C核心:

    $ brew install igraph
    

    上面的命令将为您下载,编译和安装igraph的C核心,之后您可以继续编译Python接口。

答案 1 :(得分:2)

我遇到了同样的问题,但上面的解决方案在我的mac os X Lion上无效。我无法从C源代码安装igraph。在到处寻找后,我找到了Tamas在其他地方发布的后者解决方案。所以这就是我必须做的全部事情:

D1。安装python2.6

D2。下载igraph的C库的源文件

D3。替换以下6个源文件

的src / DensityGrid.cpp

的src / DensityGrid.h

的src / DensityGrid_3d.cpp

的src / DensityGrid_3d.h

找到相应的文件

http://bazaar.launchpad.net/~igraph/igraph/0.6-main/revision/2387#src/DensityGrid.cpp

D4。在igrpah-0.5.4 /目录

中运行以下命令

./ configure

制作

make install

D5。下载源代码以安装igraph

的python扩展

D6。安装它从python-igraph-0.5.4

运行命令

sudo python2.6 setup.py install

并记得使用python2.6来运行它。