尝试使用pip为Python 3安装 python-igraph ,我得到以下编译器错误。我可以改变一些东西,或者这是igraph中的错误吗?注意行 cc1:最后一些警告被视为错误 - 如果它们只是警告,我可以忽略它们吗?
提取igraph-0.7.0.tar.gz ...
配置igraph ...
构建类型:静态扩展名
包含路径:igraphcore / include
库路径:igraphcore / lib / usr / local / lib64 / usr / local / lib / usr / lib64 / usr / lib / lib64 / lib
链接的动态库:xml2 zm stdc ++
链接的静态库:igraphcore / lib / libigraph.a
额外的编译器选项:
额外链接器选项:
建立'igraph._igraph'扩展名
创建构建/ temp.linux-x86_64-3.4
创建build / temp.linux-x86_64-3.4 / src
gcc -pthread -Wno-unused-result -Werror =声明后声明-DNDEBUG -fmessage-length = 0 -O2 -Wall -D_FORTIFY_SOURCE = 2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -Iigraphcore / include -I ../../ build / include -I ../../ include -I / usr / local / include / igraph -I / usr / include / igraph -I / usr / include / python3.4m -c src / edgeobject.c -o build / temp.linux-x86_64-3.4 / src / edgeobject.o
gcc -pthread -Wno-unused-result -Werror =声明后语句 - DNDEBUG -fmessage-length = 0 -O2 -Wall -D_FORTIFY_SOURCE = 2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -Iigraphcore / include -I ../../ build / include -I ../../ include -I / usr / local / include / igraph -I / usr / include / igraph -I / usr / include / python3.4m -c src / igraphmodule.c -o build / temp。 linux-x86_64-3.4 / src / igraphmodule.o
gcc -pthread -Wno-unused-result -Werror =声明后声明-DNDEBUG -fmessage-length = 0 -O2 -Wall -D_FORTIFY_SOURCE = 2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -Iigraphcore / include -I ../../ build / include -I ../../ include -I / usr / local / include / igraph -I / usr / include / igraph -I / usr / include / python3.4m -c src / ed geseqobject.c -o build / temp.linux-x86_64-3.4 / src / edgeseqobject.o
gcc -pthread -Wno-unused-result -Werror =声明后声明-DNDEBUG -fmessage- length = 0 -O2 -Wall -D_FORTIFY_SOURCE = 2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -Iigraphcore / include -I ../../ build / include -I .. /../include -I / usr / local / include / igraph -I / usr / include / igraph -I / usr / include / python3.4m -c src / filehandle.c -o build / temp.linux-x86_64- 3.4 / src / filehandle.o
src / filehandle.c:函数'igraphmodule_filehandle_init':
src / filehandle.c:38:5:error:ISO C90 forbids混合声明和代码[-Werror =声明后声明]
cc1:某些警告被视为错误
错误:命令'gcc'失败,退出状态1
----------------------------------------
清理...
命令/ usr / bin / python3 -c"import setuptools,tokenize; __ file __ ='/ export / tmp / pip_build_root / python-igraph / setup.py'; exec(compile(getattr(tokenize,'open',open)(__ file __).read().exc('\r\\\
','\\\
'),__file__,'exec' ))"install --record /tmp/pip-o27hxbqk-record/install-record.txt --single-version -external-managed --compile failed with error code 1 in / export / tmp / pip_build_root / python-igraph
在/root/.pip/pip.log存储调试日志失败
解决方案
最近在igraph中修复了这个问题;请参阅Github上的相应的问题。