Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
编译器安装python igraph时出错:警告被视为错误_Python_Gcc_Python 3.x_Igraph_Gcc Warning - Fatal编程技术网

编译器安装python igraph时出错:警告被视为错误

编译器安装python igraph时出错:警告被视为错误,python,gcc,python-3.x,igraph,gcc-warning,Python,Gcc,Python 3.x,Igraph,Gcc Warning,尝试使用pip for Python3安装Pythonigraph,我得到以下编译器错误。我可以改变一些东西吗?或者这是igraph中的一个bug?请注意第cc1行:一些警告最终被视为错误-如果它们只是警告,我可以忽略它们吗 Extracting igraph-0.7.0.tar.gz... Configuring igraph... Build type: static extension Include path: igraphcore/include Library path: i

尝试使用pip for Python3安装
Pythonigraph
,我得到以下编译器错误。我可以改变一些东西吗?或者这是igraph中的一个bug?请注意第
cc1行:一些警告最终被视为错误-如果它们只是警告,我可以忽略它们吗

Extracting igraph-0.7.0.tar.gz...

Configuring igraph...

Build type: static extension

Include path: igraphcore/include

Library path: igraphcore/lib /usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib /lib64 /lib

Linked dynamic libraries: xml2 z m stdc++

Linked static libraries: igraphcore/lib/libigraph.a

Extra compiler options:

Extra linker options:

building 'igraph._igraph' extension

creating build/temp.linux-x86_64-3.4

creating build/temp.linux-x86_64-3.4/src

gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -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=declaration-after-statement -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=declaration-after-statement -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/edgeseqobject.c -o build/temp.linux-x86_64-3.4/src/edgeseqobject.o

gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -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: In function ‘igraphmodule_filehandle_init’:

src/filehandle.c:38:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

cc1: some warnings being treated as errors

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /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().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-o27hxbqk-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /export/tmp/pip_build_root/python-igraph
Storing debug log for failure in /root/.pip/pip.log

最近在igraph中对此进行了修补;请参阅Github上的。

如何查找和应用您的修补程序?我已经克隆了存储库并运行了
setup.py
,但仍然出现错误。您可能签出了
master
分支,这是最新发布的版本。您需要首先切换到
development
分支。