安装 libigraph0-dev 后无法安装 python-igraph
Can't install python-igraph after installing libigraph0-dev
我已经阅读了一些关于安装 python-igraph 的其他帖子,但我仍然无法完成。
我首先安装了libigraph0-dev,但这只是改变了我错误的性质,并没有修复它。我什至无法粘贴整个日志,因为它太多字符,但这是日志的一部分。
日志的第一部分有一些错误
Downloading/unpacking python-igraph
Downloading python-igraph-0.7.1.post6.tar.gz (377kB): 377kB downloaded
Running setup.py egg_info for package python-igraph
Installing collected packages: python-igraph
Running setup.py install for python-igraph
Build type: dynamic extension
Include path:
Library path:
Runtime library path:
Linked dynamic libraries: igraph
Linked static libraries:
Extra compiler options:
Extra linker options:
building 'igraph._igraph' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c src/attributes.c -o build/temp.linux-x86_64-2.7/src/attributes.o
In file included from src/attributes.c:24:
src/attributes.h:27:31: error: igraph_attributes.h: No such file or directory
src/attributes.h:28:29: error: igraph_datatype.h: No such file or directory
src/attributes.h:29:30: error: igraph_iterators.h: No such file or directory
src/attributes.h:30:30: error: igraph_strvector.h: No such file or directory
src/attributes.h:31:27: error: igraph_vector.h: No such file or directory
In file included from src/attributes.c:24:
src/attributes.h:46: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:46: error: expected ';', ',' or ')' before '*' token
src/attributes.h:50: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:50: error: expected ';', ',' or ')' before '*' token
src/attributes.h:52: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:52: error: expected ';', ',' or ')' before '*' token
src/attributes.h:56: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:56: error: expected ';', ',' or ')' before '*' token
日志结束
src/attributes.c:1730: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.c:1730: error: expected ';', ',' or ')' before '*' token
src/attributes.c:1782: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.c:1782: error: expected ';', ',' or ')' before '*' token
src/attributes.c:1817: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'igraphmodule_attribute_table'
src/attributes.c: In function 'igraphmodule_initialize_attribute_handler':
src/attributes.c:1842: warning: implicit declaration of function 'igraph_i_set_attribute_table'
src/attributes.c:1842: error: 'igraphmodule_attribute_table' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/local/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/python-igraph/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3WW8S-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/python-igraph
有人知道如何解决这个问题吗?
下载与 libigraph0-dev
版本号匹配的 python-igraph
版本并尝试编译它。现在您正在下载 python-igraph
0.7.1.post6,应该 linked 到 igraph 0.7.1,但是您有旧版本的 libigraph0
(和 libigraph0-dev
) 在你的机器上。
如果您不需要 libigraph0
做任何其他事情,您可以删除 libigraph0
和 libigraph0-dev
并尝试从 pip 再次安装 python-igraph
。这样python-igraph
会检测到C核心没有安装,所以它会自动下载正确版本的C核心和link到它。
我已经阅读了一些关于安装 python-igraph 的其他帖子,但我仍然无法完成。
我首先安装了libigraph0-dev,但这只是改变了我错误的性质,并没有修复它。我什至无法粘贴整个日志,因为它太多字符,但这是日志的一部分。
日志的第一部分有一些错误
Downloading/unpacking python-igraph
Downloading python-igraph-0.7.1.post6.tar.gz (377kB): 377kB downloaded
Running setup.py egg_info for package python-igraph
Installing collected packages: python-igraph
Running setup.py install for python-igraph
Build type: dynamic extension
Include path:
Library path:
Runtime library path:
Linked dynamic libraries: igraph
Linked static libraries:
Extra compiler options:
Extra linker options:
building 'igraph._igraph' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c src/attributes.c -o build/temp.linux-x86_64-2.7/src/attributes.o
In file included from src/attributes.c:24:
src/attributes.h:27:31: error: igraph_attributes.h: No such file or directory
src/attributes.h:28:29: error: igraph_datatype.h: No such file or directory
src/attributes.h:29:30: error: igraph_iterators.h: No such file or directory
src/attributes.h:30:30: error: igraph_strvector.h: No such file or directory
src/attributes.h:31:27: error: igraph_vector.h: No such file or directory
In file included from src/attributes.c:24:
src/attributes.h:46: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:46: error: expected ';', ',' or ')' before '*' token
src/attributes.h:50: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:50: error: expected ';', ',' or ')' before '*' token
src/attributes.h:52: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:52: error: expected ';', ',' or ')' before '*' token
src/attributes.h:56: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.h:56: error: expected ';', ',' or ')' before '*' token
日志结束
src/attributes.c:1730: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.c:1730: error: expected ';', ',' or ')' before '*' token
src/attributes.c:1782: warning: type defaults to 'int' in declaration of 'igraph_t'
src/attributes.c:1782: error: expected ';', ',' or ')' before '*' token
src/attributes.c:1817: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'igraphmodule_attribute_table'
src/attributes.c: In function 'igraphmodule_initialize_attribute_handler':
src/attributes.c:1842: warning: implicit declaration of function 'igraph_i_set_attribute_table'
src/attributes.c:1842: error: 'igraphmodule_attribute_table' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/local/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/python-igraph/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3WW8S-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/python-igraph
有人知道如何解决这个问题吗?
下载与 libigraph0-dev
版本号匹配的 python-igraph
版本并尝试编译它。现在您正在下载 python-igraph
0.7.1.post6,应该 linked 到 igraph 0.7.1,但是您有旧版本的 libigraph0
(和 libigraph0-dev
) 在你的机器上。
如果您不需要 libigraph0
做任何其他事情,您可以删除 libigraph0
和 libigraph0-dev
并尝试从 pip 再次安装 python-igraph
。这样python-igraph
会检测到C核心没有安装,所以它会自动下载正确版本的C核心和link到它。