2016-07-29 125 views
5

我試圖在Ubuntu 14.04(x64)上安裝Anaconda Python 3.5的圖形工具,但事實證明這是一個真正的竅門。如何在linux-64上安裝Anaconda Python 3.5的圖形工具?

我試過this approach,但碰到的問題:

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

通過依賴挖掘導致了死衚衕在GObject的內省

 

所以,我想另一種方法:

用conda安裝boost,然後嘗試./configure,make和make install graph-tool ...哪有一個布特儘可能的./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 ! 

我知道這是一些關於./configure命令和暢達安裝libboost到蟒蛇的奇怪的地方環境變量,我只是不知道該怎麼辦,我的Google-fu讓我失望。所以這是另一個死路一條。

任何需要最近在linux-64上安裝圖形工具的人都會給我一個演練嗎?這是一個新的虛擬機在VMware工作站10.0.7

+1

我能夠使它在Ubuntu 14上工作。04 with Anaconda 3通過編寫'conda create -n graph -c floriangeigl -c vgauthier -c msarahan -c bioconda -c ostrokach -c salford_systems -c ptorrestr -c pkgw -c kalefranz python graph-tool'你能不能顯示命令你用過那種不可滿足的依賴性嗎? – darthbith

+0

「conda config --add channels vgauthier --add channels rwest」後跟「conda install graph-tool」 – geofurb

+0

如果您嘗試我放入評論的命令,該怎麼辦? – darthbith

回答

0

運行對於那些遇到類似的問題,嘗試首先更改暢達通道的順序:

$暢達配置--add渠道ostrokach

$暢達配置--add渠道默認

$暢達配置--add通道暢達,銳意

則:

$暢達安裝圖形工具

0

爲蟒蛇的Python 3.5,Ubuntu的14.04安裝圖形工具2.26。

注意:就我寫這篇文章而言,圖形工具的ostrokach頻道conda安裝僅在版本2.18。

下面是我用來安裝圖形工具2.26的docker文件。有可能是一種更清潔的方式,但到目前爲止,這是我設法湊齊的唯一實際工作的東西。

注意:如果您不熟悉docker文件,並且只想從終端進行安裝,請忽略第一行(以FROM開頭),忽略每個出現的單詞RUN,剩下的是一系列在終端中執行的命令。

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 

警告:make荷蘭國際集團圖表工具可能需要幾個小時,並要求> 7 GB的RAM。