2015-02-10 7 views
6

स्थापित करने में विफल रहा है मैं पायथन-igraph स्थापित करने की कोशिश कर रहा हूं। मैं निम्नलिखित लॉग मिला बाद मैं sudo pip install python-igraph चलाएँ:पायथन-igraph

Downloading/unpacking python-igraph 
    Downloading python-igraph-0.7.1-1.tar.gz (375kB): 375kB downloaded 
    Running setup.py egg_info for package python-igraph 

Installing collected packages: python-igraph 
    Running setup.py install for python-igraph 
    Cannot find the C core of igraph on this system using pkg-config. 
    We will now try to download and compile the C core from scratch. 
    Version number of the C core: 0.7.1-1 

    Version 0.7.1-1 of the C core of igraph is not found among the nightly builds. 
    Use the --c-core-version switch to try a different version. 

    Could not download and compile the C core of igraph. 

    WARNING: we were not able to detect where igraph is installed on 
    your machine (if it is installed at all). We will use the fallback 
    library and include pathss hardcoded in setup.py and hope that the 
    C core of igraph is installed there. 

    If the compilation fails and you are sure that igraph is installed 
    on your machine, adjust the following two variables in setup.py 
    accordingly and try again: 

    - LIBIGRAPH_FALLBACK_INCLUDE_DIRS 
    - LIBIGRAPH_FALLBACK_LIBRARY_DIRS 

Build type: dynamic extension          
    Include path: /usr/include/igraph /usr/local/include/igraph 
    Library path: 
    Linked dynamic libraries: igraph 
    Linked static libraries: 
    Extra compiler options: 
    Extra linker options: 
    building 'igraph._igraph' extension 
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/igraph -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/igraphmodule.c -o build/temp.linux-x86_64-2.7/src/igraphmodule.o 
    src/igraphmodule.c:25:20: fatal error: igraph.h: No such file or directory 
    #include <igraph.h> 
         ^
    compilation terminated. 
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 
    Complete output from command /usr/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-cTa4Ba-record/install-record.txt --single-version-externally-managed: 
    running install 

running build 

running build_py 

creating build 

creating build/lib.linux-x86_64-2.7 

creating build/lib.linux-x86_64-2.7/igraph 

copying igraph/formula.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/__init__.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/configuration.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/summary.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/layout.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/cut.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/datatypes.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/utils.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/clustering.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/statistics.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/matching.py -> build/lib.linux-x86_64-2.7/igraph 

copying igraph/compat.py -> build/lib.linux-x86_64-2.7/igraph 

creating build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/operators.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/isomorphism.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/__init__.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/colortests.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/conversion.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/homepage.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/attributes.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/vertexseq.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/structural.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/separators.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/atlas.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/layouts.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/rng.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/games.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/utils.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/iterators.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/edgeseq.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/indexing.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/spectral.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/cliques.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/flow.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/basic.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/generators.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/matching.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/foreign.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/bipartite.py -> build/lib.linux-x86_64-2.7/igraph/test 

copying igraph/test/decomposition.py -> build/lib.linux-x86_64-2.7/igraph/test 

creating build/lib.linux-x86_64-2.7/igraph/app 

copying igraph/app/__init__.py -> build/lib.linux-x86_64-2.7/igraph/app 

copying igraph/app/shell.py -> build/lib.linux-x86_64-2.7/igraph/app 

creating build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/__init__.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/edge.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/shapes.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/coord.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/metamagic.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/utils.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/text.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/graph.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/colors.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/vertex.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

copying igraph/drawing/baseclasses.py -> build/lib.linux-x86_64-2.7/igraph/drawing 

creating build/lib.linux-x86_64-2.7/igraph/remote 

copying igraph/remote/__init__.py -> build/lib.linux-x86_64-2.7/igraph/remote 

copying igraph/remote/nexus.py -> build/lib.linux-x86_64-2.7/igraph/remote 

copying igraph/remote/gephi.py -> build/lib.linux-x86_64-2.7/igraph/remote 

creating build/lib.linux-x86_64-2.7/igraph/vendor 

copying igraph/vendor/__init__.py -> build/lib.linux-x86_64-2.7/igraph/vendor 

copying igraph/vendor/texttable.py -> build/lib.linux-x86_64-2.7/igraph/vendor 

running build_ext 

Cannot find the C core of igraph on this system using pkg-config. 

We will now try to download and compile the C core from scratch. 

Version number of the C core: 0.7.1-1 



Version 0.7.1-1 of the C core of igraph is not found among the nightly builds. 

Use the --c-core-version switch to try a different version. 



Could not download and compile the C core of igraph. 



WARNING: we were not able to detect where igraph is installed on 

your machine (if it is installed at all). We will use the fallback 

library and include pathss hardcoded in setup.py and hope that the 

C core of igraph is installed there. 



If the compilation fails and you are sure that igraph is installed 

on your machine, adjust the following two variables in setup.py 

accordingly and try again: 



- LIBIGRAPH_FALLBACK_INCLUDE_DIRS 

- LIBIGRAPH_FALLBACK_LIBRARY_DIRS 



Build type: dynamic extension          

Include path: /usr/include/igraph /usr/local/include/igraph 

Library path: 

Linked dynamic libraries: igraph 

Linked static libraries: 

Extra compiler options: 

Extra linker options: 

building 'igraph._igraph' extension 

creating build/temp.linux-x86_64-2.7 

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

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/igraph -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/igraphmodule.c -o build/temp.linux-x86_64-2.7/src/igraphmodule.o 

src/igraphmodule.c:25:20: fatal error: igraph.h: No such file or directory 

#include <igraph.h> 

        ^

compilation terminated. 

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 

---------------------------------------- 
Cleaning up... 
Command /usr/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-cTa4Ba-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/python-igraph 
Storing complete log in /home/sergey/.pip/pip.log 

और मैं इसी तरह की स्थिति है, तो मैं sudo python setup.py install साथ करते हैं।

स्पष्ट रूप से समस्या सी कोर के साथ है।

मैं इसका सही संस्करण कैसे स्थापित कर सकता हूं ताकि मैं igraph इंस्टॉल कर सकूं?

मैं लिनक्स मिंट 16 64-बिट, पायथन 2.7 का उपयोग करता हूं।

उत्तर

9

आपको पाइथन-इग्राफ संकलित करने से पहले इग्राफ पुस्तकालयों की आवश्यकता है।

sudo apt-get install -y libigraph0-dev आज़माएं और फिर से पायथन-इग्राफ स्थापित करने का प्रयास करें।

+0

मुझे एक ही त्रुटि है। खिड़कियों के लिए इसी पुस्तकालय क्या है? – Jack

+0

मुझे एक ही त्रुटि है, लेकिन मैं एक मैक उपयोगकर्ता हूँ। कोई विचार क्या मैं कर सकता था? –

2

खिड़कियां उपयोगकर्ताओं

  1. Download के लिए अनौपचारिक python-igraph (igraph official installation instruction के अनुसार), कृपया पर्यावरण के आधार पर उपयुक्त .whl फ़ाइल (अजगर संस्करण, 64 बिट बनाम 32 बिट) का चयन करें।
  2. ओपन आदेश कंसोल और cd .whl के फ़ोल्डर में
  3. निम्न आदेश निष्पादित करें:

    pip install python_igraph-0.7.1.post.xxx.whl 
    
+0

हाय, मैंने python_igraph-0.7.1.post6-cp34-none-win_amd64.whl python_igraph-0.7.1.post6-cp35-none-win_amd64.whl दोनों को डाउनलोड किया है और उन्हें Windows 10 पर पाइप इंस्टॉल के साथ स्थापित करने का प्रयास किया है वर्चुअल बॉक्स जो पाइथन 3.6.2 चला रहा है (pycairo स्थापित है)। मुझे यह त्रुटि संदेश वापस मिला है python_igraph-0.7.1.post6-cp35-none-win_amd64.whl इस प्लेटफ़ॉर्म पर समर्थित व्हील नहीं है। क्या इसका मतलब है कि पायथन 3.6 समर्थित नहीं है? – Athanassios

0

उबंटू उपयोगकर्ताओं के लिए:

उपयुक्त करने के लिए igraph का भंडार जोड़ें:

sudo add-apt-repository ppa:igraph/ppa 

फिर अपडेटा te और python-igraph संकुल को स्थापित करें:

sudo apt-get update 
sudo apt-get install python-igraph 
+0

मैं इसे पायथन 3 के लिए उपयोग करना चाहता हूं। इन आदेशों में क्या परिवर्तन होते हैं? – any

0

उबंटू 16 और पायथन 3 का उपयोग करना।

pip3 install python-igraph 

त्रुटि निर्माण पहिया में परिणाम। हालांकि,

sudo apt-get install python3-igraph 

बस ठीक काम किया।