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


 



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

feng_blog6688

只需一个赞,谢谢你的鼓励

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值