Torch安装失败

我按照这里的指令安装了Torch,它附带了Lua 5.1,但是我之前在系统上安装了Lua 5.3。现在当我尝试使用Torch运行程序时,我得到以下错误信息:

/Users/Marcel/torch/install/share/lua/5.1/trepl/init.lua:389: module 'Settings.arguments' not found:No LuaRocks module found for Settings.arguments
    no field package.preload['Settings.arguments']

no file '/usr/local/share/lua/5.1/Settings/arguments.lua'
no file '/usr/local/share/lua/5.1/Settings/arguments/init.lua'

看起来Torch在系统目录中寻找自己的Lua版本,而这些目录只包含之前安装的版本。有办法修复这个问题,还是我必须卸载Lua 5.3?

谢谢!

点赞
用户2626239
用户2626239

只需将 TORCH_LUA_VERSION 值更改为 LUAXX,并按照5.2版本的安装说明进行操作。对于5.3版本,请使用 LUA53

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

# 清除旧的 torch 安装 
./clean.sh
# 可选的清除命令(适用于旧的 torch 版本)
# curl -s https://raw.githubusercontent.com/torch/ezinstall/master/clean-old.sh | bash

# https://github.com/torch/distro:设置环境以使用 lua
TORCH_LUA_VERSION=LUA53 ./install.sh
2017-07-05 09:21:28