torch7 install 环境搭建

1、before intallation,you should install node.js,gfx.js

Node.js是一个软件平台,通常用于构建大规模的服务器端应用。Node.js使用JavaScript作为其脚本语言,由于其非阻塞I/O设计以及单线程事件循环机制,使得它可以交付超高的性能。

 

Node.js包含了Google V8 JavaScript引擎,libuv库和核心库几乎都是使用JavaScript编写的。libuv库提供了异步事件I/O的抽象和Node.js跨平台的机制。

 

Node.js最初是由Ryan Dahl创建的,目前由IsaacSchlueter在演进和维护。

 

在互联网上有很多从源码编译安装Node.js的文章,在此我强烈建议不要采用这种方法。大多数情况下,包维护者对软件结构了解的非常清楚,开发者无需从头编译最新版本的源码。

The installation of node.gs:

# apt-get update  
# apt-get install -y python-software-properties software-properties-common  
# add-apt-repository ppa:chris-lea/node.js  
# apt-get update  
# apt-get install node.js

the intallation of gfx.js:


apt-get install libgraphicsmagick1-dev
apt-get install graphicsmagick

Then simply run:

luarocks install https://raw.github.com/clementfarabet/gfx.js/master/gfx.js-scm-0.rockspec

Once installed, you can start/stop theserver like this (I'm assuming a LuaJIT-based install):

luajit -lgfx.start
luajit -lgfx.stop

GraphicsMagick号称图像处理领域的瑞士军刀。短小精悍的代码却提供了一个鲁棒、高效的工具和库集合,来处理图像的读取、写入和操作,支持超过88种图像格式,包括重要的DPX、GIF、JPEG、JPEG-2000、PNG、PDF、PNM和TIFF

2、接下来安装torch7

The easiest way to install Torch is to runthese two commands:

$ curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
$ curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-luajit+torch | bash

The first script installs basic dependencies/ libraries that LuaJIT and Torch require. The second script installs LuaJIT,Luarocks, and then uses Luarocks to install Torch and a few common/usefulpackages. These scripts work on Ubuntu >= 12.04 and OSX >= 10.8.

 

If you install Luajit and Luarocks yourself,you'll have to specify the URL to our rock server, to find Torch. We recommendyou either use the script above to automate that process.

$ luarocks  --version
$luajit -v
$luarocks --server=https://raw.githubusercontent.com/torch/rocks/master install torch
3、如果安装torch7成功,运行th命令




4、如果自己安装torch包,用下面的命令

install a package of torch7:

 

luarocksinstall  [packagename]

 

luarocks list


 



你可能感兴趣的:(Deep,learning)