2016-07-15 6 views
0

Я хочу установить igraph для питона 2.7.12 от Anaconda 4.1.1 У меня есть Fedora 24. Как было предложено (https://anaconda.org/pypi/python-igraph) Я использовал эту командную строку:Установите python-igraph с помощью anaconda2 pip, нет ядра C. Linux Fedora 24

pip install -i https://pypi.anaconda.org/pypi/simple 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 
    We will also try: 0.7.0 

    Downloading igraph-0.7.0.tar.gz... 100.00% 
    Extracting igraph-0.7.0.tar.gz... 
    Configuring igraph... 
    checking for a BSD-compatible install... /usr/bin/install -c 
    checking whether build environment is sane... yes 
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p 
    checking for gawk... gawk 
    checking whether make sets $(MAKE)... yes 
    checking whether make supports nested variables... yes 
    checking for gcc... gcc 
    checking whether the C compiler works... yes 
    checking for C compiler default output file name... a.out 
    checking for suffix of executables... 
    checking whether we are cross compiling... no 
    checking for suffix of object files... o 
    checking whether we are using the GNU C compiler... yes 
    checking whether gcc accepts -g... yes 
    checking for gcc option to accept ISO C89... none needed 
    checking whether gcc understands -c and -o together... yes 
    checking for style of include used by make... GNU 
    checking dependency style of gcc... gcc3 
    checking for g++... no 
    checking for c++... no 
    checking for gpp... no 
    checking for aCC... no 
    checking for CC... no 
    checking for cxx... no 
    checking for cc++... no 
    checking for cl.exe... no 
    checking for FCC... no 
    checking for KCC... no 
    checking for RCC... no 
    checking for xlC_r... no 
    checking for xlC... no 
    checking whether we are using the GNU C++ compiler... no 
    checking whether g++ accepts -g... no 
    checking dependency style of g++... none 
    configure: error: no C++ compiler found or it cannot create executables 
    Could not download and compile the C core of igraph. 

[...]

In file included from src/vertexseqobject.c:26:0: 
    src/attributes.h:27:31: fatal error: igraph_attributes.h: No such file or directory 
    #include <igraph_attributes.h> 
           ^
    compilation terminated. 
    error: command 'gcc' failed with exit status 1 

    ---------------------------------------- 
Command "/home/ritamaria/anaconda2/bin/python -u -c "import setuptools, tokenize;_ 

_file__='/tmp/pip-build-aKLm3d/python-igraph/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-32PKAO-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-aKLm3d/python-igraph/ 

Однако, когда я проверяю, если у меня есть GCC я получаю:

dnf install gcc 
Last metadata expiration check: 1:16:49 ago on Fri Jul 15 09:02:56 2016. 
Package gcc-6.1.1-3.fc24.x86_64 is already installed, skipping. 
Dependencies resolved. 
Nothing to do. 
Complete! 

С igraph страницы говорит:

если ядро ​​C не установлен или установлен в месте, которое не может быть обнаружены с помощью pkg-config, pip попытается загрузить подходящую версию ядра C и скомпилировать ее вместе с интерфейсом Python .

Таким образом, я думаю, что pip попытался загрузить C-ядро, но не смог/не работал.

Как правильно установить python-igraph?

Заранее спасибо.

+0

Текущее состояние является то, что вы должны скомпилировать igraph себя (быть в курсе, что главный филиал igraph не в настоящее время компиляции в MSVC: https://github.com/igraph/igraph/pull/951) и установите некоторые строки в setup.py в правильные директории/файлы, чтобы заставить их работать. Если он не работает лучше, я просто перейду на http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph и установит колесо оттуда :-) –

ответ

1

Fedora 24 ...

не проверяя г ++ ... нет

Установка г ++: # dnf install gcc-c++

igraph библиотеки, igraph_attributes.h и т.д. и т.п. заголовки .h: # dnf install igraph-devel (Вы получаете версию 0.7.1).

питон файлы:

# pip install --upgrade pip 
# pip install igraph 
+0

Установите g ++: # dnf install gcc-C++ работы было достаточно. Благодаря! –

 Смежные вопросы

  • Нет связанных вопросов^_^