下载torch安装包:

git clone https://github.com/torch/distro.git torch --recursive

安装依赖库:

cd torch/

sudo bash install-deps

安装好后会提示:

Torch7’s dependencies have been installed

安装torch:

sudo ./install.sh

安装到最后会提示是否将torch安装路径加入~/.bashrc文件中:

Do
you want to automatically prepend the Torch install location

to
PATH and LD_LIBRARY_PATH in your /home/qinghua/.bashrc? (yes/no)

选择自动添加,输入yes,enter即可.

终端输入th命令进入torch:

th

这时提示错误:

/usr/local/bin/th:

3:
/home/qinghua/program/torch_src/torch/install/bin/luajit: 没有那个文件或目录

这是因为系统找不到torch安装路径,这时候需要更新环境变量,即运行:

source ~/.bashrc

重新输入th即可

th

大概出现这样的画面

______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch

th>
[0.0000s]
th>

最新文章

  1. 微信公众号开发之VS远程调试
  2. Linux--目录结构解释(转)
  3. [速记!vs调试技巧]
  4. poj 1737 Connected Graph
  5. ActivityGroup里面装的子Activity不执行OnActivityResult()的解决办法
  6. HDFS+MapReduce+Hive+HBase十分钟快速入门
  7. SQL SERVER 2008安装时出现不能在控件上调用 Invoke 或 BeginInvoke错误 解决方法
  8. SAR命令
  9. ASP.NET Web API安全认证
  10. Android开源库--Asynchronous Http Client异步http客户端
  11. 对GBK的理解(内附全部字符编码列表):扩充的2万汉字低字节的高位不等于1,而且还剩许多编码空间没有利用
  12. How to: Hide the Ribbon in SharePoint 2010
  13. Delphi组件indy 10中IdTCPServer修正及SSL使用心得
  14. MySQL日志概述
  15. ZBar Installer
  16. Extjs之rowEditing编辑状态时列不对齐
  17. Windows DLL资料整理
  18. Mui Webview下来刷新上拉加载实现
  19. ie低版本内核事件兼容问题(事件绑定,绑定事件自动执行,文档模式问题)
  20. HDFS(二) 底层通信原理——RPC 及 动态代理

热门文章

  1. 统计redis大key信息(前topN)
  2. 关于npm 的注意事项
  3. R语言函数化学习笔记4
  4. Spring组件BeanDefinition 源码解析
  5. nice-validator判断表单是否验证通过
  6. python特性
  7. Codeforces Round #623 (Div. 1, based on VK Cup 2019-2020 - Elimination Round, Engine)A(模拟,并查集)
  8. 【转】常见的hash算法及其原理
  9. Dapper简介
  10. 搭建Python开发环境(Mac)