2015-05-13 40 views
2

當安裝IGRAPH 0.7我試圖從安裝python-的igraph:埃羅在Debian

pip install python-igraph

[https://github.com/igraph/python-igraph]python setup.py build

都報告等於這個錯誤的錯誤:我有另一個錯誤:

輸入:sudo python setup.py buildsudo pip install python-igraph

輸出:

/usr/local/lib/python2.7/dist-packages/setuptools-15.0-py2.7.egg/setuptools/dist.py:282: UserWarning: Normalizing '0.7.1-4' to '0.7.1.post4' 
running install 
running bdist_egg 
running egg_info 
creating python_igraph.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 
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 
writing manifest file 'python_igraph.egg-info/SOURCES.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.linux-x86_64/egg 
running install_lib 
running build_py 
running build_ext 
Build type: dynamic extension 
Include path: /usr/local/include/igraph 
Library path: /usr/local/lib 
Linked dynamic libraries: igraph 
Linked static libraries: 
Extra compiler options: 
Extra linker options: 
building 'igraph._igraph' extension 
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/edgeobject.c -o build/temp.linux-x86_64-2.7/src/edgeobject.o 
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/random.c -o build/temp.linux-x86_64-2.7/src/random.o 
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/bfsiter.c -o build/temp.linux-x86_64-2.7/src/bfsiter.o 
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/edgeseqobject.c -o build/temp.linux-x86_64-2.7/src/edgeseqobject.o 
In file included from src/edgeseqobject.c:27:0: 
src/convert.h:63:57: error: unknown type name ‘igraph_layout_grid_t’ 
src/convert.h:66:63: error: unknown type name ‘igraph_random_walk_stuck_t’ 
error: command 'gcc' failed with exit status 1 

誰能幫助我?

回答

2

您有一個安裝在/usr/local中的igraph C核的副本,但它與您嘗試安裝的Python接口的版本不兼容。從輸出結果來看,您正在安裝python-igraph 0.7.1-4,它與igraph 0.7.1兼容。因此,要麼安裝igraph的C核心版本0.7.1,要麼從/usr/local/include/igraph,/usr/local/lib和可能的/usr/local/lib/pkgconfig中刪除所有與igraph相關的東西,然後再用pip install python-igraph再次嘗試。如果您從計算機中刪除了C核,pip install python-igraph將嘗試下載並在編譯Python界面時鏈接到它。

+0

謝謝,這個信息適合我:) –