简体   繁体   English

Ubuntu 12.04上的SHOGUN

[英]SHOGUN on Ubuntu 12.04

What's the best way to get the latest SHOGUN / Python modular interface ( http://www.shogun-toolbox.org ) installed on 12.04? 获取安装在12.04上的最新SHOGUN / Python模块化接口( http://www.shogun-toolbox.org )的最佳方法是什么? I tried from source without much luck (happy to post errors); 我从源头进行了尝试,但运气不佳(乐于张贴错误); Is it possible to install the Trusty Tahr package on 12.04? 是否可以在12.04上安装Trusty Tahr软件包? https://launchpad.net/ubuntu/+source/shogun/3.1.1-1 https://launchpad.net/ubuntu/+source/shogun/3.1.1-1

(I am the debian maintainer of this package). (我是该软件包的debian维护者)。

You could try to 您可以尝试

apt-get -b source shogun

but it will give you only the core libshogun library at this very moment. 但此刻它只会为您提供核心的libshogun库。 There is a python package on the way (in debian) but not yet accepted and not yet in ubuntu. (在debian中)有一个python包,但尚未被接受,在ubuntu中还没有。

https://ftp-master.debian.org/new/python-shogun_3.1.1-1.html https://ftp-master.debian.org/new/python-shogun_3.1.1-1.html

So you are really best of installing from source. 因此,您真正最好从源代码安装。 Shogun has buildbots running on ubuntu creating a python package. Shogun有在ubuntu上运行的buildbots创建了python包。 So you can just copy the settings from there: 因此,您可以仅从此处复制设置:

https://travis-ci.org/shogun-toolbox/shogun/jobs/18605663 https://travis-ci.org/shogun-toolbox/shogun/jobs/18605663

Following this posts here and this instruction i did the following that worked for me to install shogun directly into my conda env. 按照这里的这篇文章和此说明,我做了以下工作,这些工作对我来说将shogun直接安装到conda env中。 Its not the most elegant way but worked out so far. 到目前为止,它不是最优雅的方法,但是已经解决了。

! Take care to have swig: ie. 小心喝酒:即。 installed apt-get install swig ! 安装了apt-get install swig! I used anaconda and the shogun python infterface - so my cmake prefix was /home/user/anaconda/ 我使用anaconda和幕府将军python infterface-所以我的cmake前缀是/ home / user / anaconda /

You need cmake to build shogun: 您需要使用cmake来构建幕府将军:

SET UP CMAKE FIRST (skip if you have cmake > 3.1) 首先设置CMAKE(如果cmake> 3.1,请跳过)

  1. cd /path to your installation directory cd /安装目录路径
  2. workdir=$(pwd) #ie your home workdir = $(pwd)#ie您的家
  3. Download and install cmake into your home: 将cmake下载并安装到您的家中:
  4. wget http://www.cmake.org/files/v3.1/cmake-3.1.3.tar.gz wget http://www.cmake.org/files/v3.1/cmake-3.1.3.tar.gz
  5. tar xzf cmake-3.1.3.tar.gz tar xzf cmake-3.1.3.tar.gz
  6. cd cmake-3.1.3 cd cmake-3.1.3
  7. cmake_dir=$workdir/cmake 5 ./configure --prefix=$cmake_dir cmake_dir = $ workdir / cmake 5 ./配置--prefix = $ cmake_dir
  8. make -j 2 使-j 2
  9. make install 进行安装
  10. Export cmake to your PATH so you can use it for shogun: export PATH=$cmake_dir/bin/:$PATH 将cmake导出到您的PATH中,以便将其用于将军:export PATH = $ cmake_dir / bin /:$ PATH

Download and install shogun into anaconda env 下载将军将军并将其安装到anaconda env中

  1. wget ftp://shogun-toolbox.org/shogun/releases/3.1/sources/shogun-3.1.1.tar.bz2 wget ftp://shogun-toolbox.org/shogun/releases/3.1/sources/shogun-3.1.1.tar.bz2
  2. tar jxf shogun-3.1.1.tar.bz2 3 cd shogun-3.1.1/ tar jxf幕府将军3.1.1.tar.bz2 3 cd幕府将军3.1.1 /
  3. mkdir build mkdir构建
  4. cd build 光盘制作
  5. cmake -DPythonStatic=ON -DPythonModular=ON -DCMAKE_INSTALL_PREFIX=/home/myusername/anaconda/envs/p27/ .. cmake -DPythonStatic = ON -DPythonModular = ON -DCMAKE_INSTALL_PREFIX = / home / myusername / anaconda / envs / p27 /。
  6. make -j2 all #four processes takes a while 使-j2所有#四个进程花费一段时间
  7. make install 进行安装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM