2016-07-29 38 views
5

Ich versuche, Graph-Tool für Anaconda Python 3.5 auf Ubuntu 14.04 (x64) zu installieren, aber es stellt sich heraus, dass es ein echter Trick ist.Wie installiert man Graph-Tool für Anaconda Python 3.5 auf Linux-64?

Ich versuchte this approach, aber in das Problem führen:

The following specifications were found to be in conflict: 
    - graph-tool 
Use "conda info <package>" to see the dependencies for each package. 

die Abhängigkeiten Graben durch

bei gobject-Innerlichkeit zu einer Sackgasse geführt

 

So habe ich versucht, einen anderen Ansatz:

Installierte Boost mit Conda, dann versucht, ./configure, make, und machen Sie installieren Grafik-Tool ..., die a Kampf so weit wie configure:

=========================== 
Using python version: 3.5.2 
=========================== 
checking for boostlib >= 1.54.0... yes 
checking whether the Boost::Python library is available... yes 
checking whether boost_python is the correct library... no 
checking whether boost_python-py27 is the correct library... no 
checking whether boost_python-py27 is the correct library... (cached) no 
checking whether boost_python-py27 is the correct library... (cached) no 
checking whether boost_python-py35 is the correct library... yes 
checking whether the Boost::IOStreams library is available... yes 
configure: error: Could not link against boost_python-py35 ! 

Ich weiß, das ist etwas über Umgebungsvariablen für die ./configure-Befehl und Conda Installation libboost zu Anacondaâs seltsamen Ort, ich weiß einfach nicht, was zu tun, und meine Google-Fu versagt mich. Das ist also eine andere Sackgasse.

Kann jeder, der kürzlich in Linux-64 Graph-Tool installieren musste, mir eine Komplettlösung geben? Es ist eine neue VM in VMWare Workstation läuft 10.0.7

+1

Ich konnte es auf Ubuntu 14 arbeiten lassen.04 mit Anaconda 3 durch das Schreiben von 'conda erstellen -n Grafik -c floriangeigl -c vgauthier -c msarahan -c bioconda -c ostrokach -c salford_systems -c ptorrestr -c pkgw -c kalefranz python graph-tool' Können Sie bitte den Befehl zeigen Hast du diese unerfüllbare Abhängigkeit benutzt? – darthbith

+0

"conda config --add Kanäle vgauthier --add Kanäle rwest" gefolgt von "conda install graph-tool" – geofurb

+0

Was ist, wenn Sie den Befehl versuchen, den ich in meinen Kommentar einlege? – darthbith

Antwort

0

Für diejenigen, die in ähnliche Probleme stoßen, versuchen Sie die Reihenfolge der Conda Kanalwechsel zunächst mit:

Conda Config $ --add Kanäle ostrokach

$ Conda Config --add Kanäle defaults

$ Conda Config --add Kanäle Conda schmieden

dann:

$ Conda installieren Graph-Tool

0

Installation Graph-Tool 2.26 für Anaconda Python 3.5, Ubuntu 14.04.

Hinweis: als ich dies schreibe, war der Ostrokach Kanal Conda Installation von Graph-Tool nur bei Version 2.18.

Hier ist die Docker-Datei, die ich verwende, um Graph-Tool 2.26 zu installieren. Es gibt wahrscheinlich einen saubereren Weg, aber bis jetzt ist das das Einzige, was ich zusammen geschafft habe, das tatsächlich funktioniert.

HINWEIS: Wenn Sie mit Docker-Dateien nicht vertraut sind und die Installation nur vom Terminal aus durchführen möchten, ignorieren Sie die erste Zeile (beginnend mit FROM), ignorieren Sie jedes Vorkommen des Worts RUN und was Sie? re links mit ist eine Reihe von Befehlen, die in einem Terminal ausgeführt werden.

FROM [your 14.04 base image] 

RUN conda upgrade -y conda 
RUN conda upgrade -y matplotlib 

RUN \ 
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \ 
apt-get update -y && \ 
apt-get install -y gcc-5 g++-5 && \ 
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 

RUN wget https://github.com/CGAL/cgal/archive/releases/CGAL-4.10.2.tar.gz && \ 
tar xzf CGAL-4.10.2.tar.gz && \ 
cd cgal-releases-CGAL-4.10.2/ && \ 
cmake . && \ 
make && \ 
make install 

RUN cd /tmp && \ 
# note: master branch of repo appears relatively stable, has not been updated since 2016 
git clone https://github.com/sparsehash/sparsehash.git && \ 
cd sparsehash && \ 
./configure && \ 
make && \ 
make install 

RUN apt-get update 
RUN apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev 
RUN apt-get install -y autogen autoconf libtool shtool 

# install boost 
RUN cd /tmp && \ 
wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz && \ 
tar xzvf boost_1_66_0.tar.gz && \ 
cd boost_1_66_0 && \ 
sudo ./bootstrap.sh --prefix=/usr/local && \ 
sudo ./b2 && \ 
sudo ./b2 install 

# install newer cairo 
RUN cd /tmp && \ 
wget https://cairographics.org/releases/cairo-1.14.12.tar.xz && \ 
tar xf cairo-1.14.12.tar.xz && \ 
cd cairo-1.14.12 && \ 
./configure && \ 
make && \ 
sudo make install 

RUN cd /tmp && \ 
wget https://download.gnome.org/sources/libsigc++/2.99/libsigc++-2.99.10.tar.xz && \ 
tar xf libsigc++-2.99.10.tar.xz && \ 
cd libsigc++-2.99.10 && \ 
./configure && \ 
make && \ 
sudo make install && \ 
sudo cp ./sigc++config.h /usr/local/include/sigc++-3.0/sigc++config.h 

RUN cd /tmp && \ 
wget https://www.cairographics.org/releases/cairomm-1.15.5.tar.gz && \ 
tar xf cairomm-1.15.5.tar.gz && \ 
cd cairomm-1.15.5 && \ 
./configure && \ 
make && \ 
sudo make install && \ 
sudo cp ./cairommconfig.h /usr/local/include/cairomm-1.16/cairomm/cairommconfig.h 

RUN conda install -y -c conda-forge boost pycairo 
RUN conda install -y -c numba numba=0.36.2 

RUN conda install -y -c libboost py-boost && \ 
conda update -y cffi dbus expat pycairo pandas scipy numpy harfbuzz setuptools boost 

RUN apt-get install -y apt-file dbus libdbus-1-dev && \ 
apt-file update 

RUN apt-get install -y graphviz 
RUN conda install -y -c conda-forge python-graphviz 

RUN sudo apt-get install -y valgrind 

RUN apt-get install -y libcgal-dev libcairomm-1.0 libcairomm-1.0-dev libcairo2-dev python-cairo-dev 

RUN conda install -y -c conda-forge pygobject 
RUN conda install -y -c ostrokach gtk 

RUN cd /tmp && \ 
wget https://git.skewed.de/count0/graph-tool/repository/release-2.26/archive.tar.bz2 && \ 
bunzip2 archive.tar.bz2 && \ 
tar -xf archive.tar && \ 
cd graph-tool-release-2.26-b89e6b4e8c5dba675997d6f245b301292a5f3c59 && \ 
# Fix problematic parts of the graph-tool configure.ac file 
sed -i 's/PKG_INSTALLDIR/#PKG_INSTALLDIR/' ./configure.ac && \ 
sed -i 's/AM_PATH_PYTHON(\[2\.7\])/AM_PATH_PYTHON(\[3\.5\])/' ./configure.ac && \ 
sed -i 's/\${PYTHON}/\/usr\/local\/anaconda3\/bin\/python/' ./configure.ac && \ 
sed -i '$a ACLOCAL_AMFLAGS = -I m4' ./Makefile.am && \ 
sudo ./autogen.sh && \ 
sudo ./configure CPPFLAGS="-I/usr/local/include -I/usr/local/anaconda3/pkgs/pycairo-1.15.4-py35h1b9232e_1/include -I/usr/local/include/cairo -I/usr/local/include/sigc++-3.0 -I/usr/include/freetype2" \ 
    LDFLAGS="-L/usr/local/include -L/usr/local/lib/cairo -L/usr/local/include/sigc++-3.0 -L/usr/include/freetype2" \ 
    PYTHON="/usr/local/anaconda3/bin/python" \ 
    PYTHON_VERSION=3.5 \ 
sudo make && \ 
sudo make install 

Warnung: make ing Graph-Tool kann ein paar Stunden dauern und erfordern> 7 GB RAM.